1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,optin.cplusplus.UninitializedObject \
2 // RUN: -std=c++11 -DPEDANTIC -verify %s
4 class UninitPointerTest
{
5 int *ptr
; // expected-note{{uninitialized pointer 'this->ptr'}}
6 int dontGetFilteredByNonPedanticMode
= 0;
9 UninitPointerTest() {} // expected-warning{{1 uninitialized field}}
12 void fUninitPointerTest() {
16 class UninitPointeeTest
{
18 int dontGetFilteredByNonPedanticMode
= 0;
21 UninitPointeeTest(int *ptr
) : ptr(ptr
) {} // no-warning
24 void fUninitPointeeTest() {
26 UninitPointeeTest
t(&a
);