1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,optin.cplusplus.UninitializedObject -std=c++11 -fblocks -verify %s
3 typedef void (^myBlock) ();
5 struct StructWithBlock {
7 myBlock z; // expected-note{{uninitialized field 'this->z'}}
9 StructWithBlock() : a(0), z(^{}) {}
11 // Miss initialization of field `z`.
12 StructWithBlock(int pA) : a(pA) {} // expected-warning{{1 uninitialized field at the end of the constructor call}}
16 void warnOnUninitializedBlock() {
17 StructWithBlock a(10);
20 void noWarningWhenInitialized() {
26 id z; // expected-note{{uninitialized pointer 'this->z'}}
27 StructWithId() : a(0) {} // expected-warning{{1 uninitialized field at the end of the constructor call}}
30 void warnOnUninitializedId() {