diff options
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | test/Sema/uninit-variables.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 7bf12f26ec..17fb942fc8 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -840,7 +840,7 @@ def warn_uninit_var : Warning<"variable %0 is possibly uninitialized when used h 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< diff --git a/test/Sema/uninit-variables.c b/test/Sema/uninit-variables.c index ce3f93d590..1a080299aa 100644 --- a/test/Sema/uninit-variables.c +++ b/test/Sema/uninit-variables.c @@ -193,8 +193,8 @@ int test28() { } 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() { |