brintos

brintos / llvm-project-archived public Read only

0
0
Text · 739 B · 856cc5f Raw
23 lines · cpp
1// RUN: rm -fR %t2// RUN: mkdir %t3// RUN: %clang_analyze_cc1 -analyzer-checker=optin.cplusplus.UninitializedObject \4// RUN:                    -analyzer-output=html -o %t -verify %s5// RUN: cat %t/report-*.html | FileCheck %s6 7struct A {8  int *iptr;9  int a;  // expected-note{{uninitialized field 'this->a'}}10  int b;  // expected-note{{uninitialized field 'this->b'}}11 12  A (int *iptr) : iptr(iptr) {} // expected-warning{{2 uninitialized fields at the end of the constructor call [optin.cplusplus.UninitializedObject]}}13};14 15void f() {16  A a(0);17}18 19//CHECK:      <tr><td class="rowname">Note:</td>20//CHECK-NOT:  <a href="#Note0">21//CHECK-SAME: <a href="#Note1">line 9, column 7</a>22//CHECK-SAME: <a href="#Note2">line 10, column 7</a>23