зеркало из https://github.com/microsoft/clang-1.git
Move uninitialized variable checking back under -Wuninitialized-experimental. It is clear from user feedback that this warning is not quite ready.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
6b5a61b6dc
Коммит
1b52844501
|
@ -848,12 +848,12 @@ def note_uninit_reference_member : Note<
|
|||
def warn_field_is_uninit : Warning<"field is uninitialized when used here">,
|
||||
InGroup<Uninitialized>;
|
||||
def warn_uninit_var : Warning<"variable %0 is possibly uninitialized when used here">,
|
||||
InGroup<Uninitialized>, DefaultIgnore;
|
||||
InGroup<DiagGroup<"uninitialized-experimental">>, DefaultIgnore;
|
||||
def note_uninit_var_def : Note<
|
||||
"variable %0 is declared here">;
|
||||
def warn_uninit_var_captured_by_block : Warning<
|
||||
"variable %0 is possibly uninitialized when captured by block">,
|
||||
InGroup<Uninitialized>, DefaultIgnore;
|
||||
InGroup<DiagGroup<"uninitialized-experimental">>, DefaultIgnore;
|
||||
def note_var_fixit_add_initialization : Note<
|
||||
"add initialization to silence this warning">;
|
||||
def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fblocks %s -verify
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -fsyntax-only -fblocks %s -verify
|
||||
|
||||
int test1() {
|
||||
int x; // expected-note{{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only %s -verify
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -fsyntax-only %s -verify
|
||||
|
||||
int test1_aux(int &x);
|
||||
int test1() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fblocks %s -verify
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized-experimental -fsyntax-only -fblocks %s -verify
|
||||
|
||||
// Duplicated from uninit-variables.c.
|
||||
// Test just to ensure the analysis is working.
|
||||
|
|
Загрузка…
Ссылка в новой задаче