InGroup<Uninitialized>, DefaultIgnore;
def note_uninit_var_def : Note<
"variable %0 is declared here">;
-def warn_uninit_var_captured_by_block : Note<
+def warn_uninit_var_captured_by_block : Warning<
"variable %0 is possibly uninitialized when captured by block">,
InGroup<Uninitialized>, DefaultIgnore;
def note_var_fixit_add_initialization : Note<
}
void test29() {
- int x;
- (void) ^{ (void) x; };
+ int x; // expected-note{{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}
+ (void) ^{ (void) x; }; // expected-warning{{variable 'x' is possibly uninitialized when captured by block}}
}
void test30() {