Take 2: merge -Wuninitialized-experimental into -Wuninitialized. Only *must-be-uninitialized* warnings are reported, with *maybe-uninitialized* under a separate flag. I await any fallout/comments/feedback, although hopefully this will produce no noise for users.

llvm-svn: 127670
This commit is contained in:
Ted Kremenek 2011-03-15 05:22:33 +00:00
parent 1a47f366b7
commit ea6c20adaf
4 changed files with 5 additions and 5 deletions

View File

@ -867,7 +867,7 @@ def note_uninit_reference_member : Note<
def warn_field_is_uninit : Warning<"field is uninitialized when used here">, def warn_field_is_uninit : Warning<"field is uninitialized when used here">,
InGroup<Uninitialized>; InGroup<Uninitialized>;
def warn_uninit_var : Warning<"variable %0 is possibly uninitialized when used here">, def warn_uninit_var : Warning<"variable %0 is possibly uninitialized when used here">,
InGroup<DiagGroup<"uninitialized-experimental">>, DefaultIgnore; InGroup<Uninitialized>, DefaultIgnore;
def warn_maybe_uninit_var : def warn_maybe_uninit_var :
Warning<"variable %0 is possibly uninitialized when used here">, Warning<"variable %0 is possibly uninitialized when used here">,
InGroup<UninitializedMaybe>, DefaultIgnore; InGroup<UninitializedMaybe>, DefaultIgnore;
@ -875,7 +875,7 @@ def note_uninit_var_def : Note<
"variable %0 is declared here">; "variable %0 is declared here">;
def warn_uninit_var_captured_by_block : Warning< def warn_uninit_var_captured_by_block : Warning<
"variable %0 is possibly uninitialized when captured by block">, "variable %0 is possibly uninitialized when captured by block">,
InGroup<DiagGroup<"uninitialized-experimental">>, DefaultIgnore; InGroup<Uninitialized>, DefaultIgnore;
def warn_maybe_uninit_var_captured_by_block : Warning< def warn_maybe_uninit_var_captured_by_block : Warning<
"variable %0 is possibly uninitialized when captured by block">, "variable %0 is possibly uninitialized when captured by block">,
InGroup<UninitializedMaybe>, DefaultIgnore; InGroup<UninitializedMaybe>, DefaultIgnore;

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -Wuninitialized-maybe -fsyntax-only -fblocks %s -verify // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -Wuninitialized-maybe -fsyntax-only -fblocks %s -verify
int test1() { int test1() {
int x; // expected-note{{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}} int x; // expected-note{{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -fsyntax-only %s -verify // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only %s -verify
int test1_aux(int &x); int test1_aux(int &x);
int test1() { int test1() {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -fsyntax-only -fblocks %s -verify // RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fblocks %s -verify
// Duplicated from uninit-variables.c. // Duplicated from uninit-variables.c.
// Test just to ensure the analysis is working. // Test just to ensure the analysis is working.