From 908c09f64e50db64c935255089ffcf4615ca4b0e Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 15 Mar 2011 05:22:33 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127670 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 4 ++-- test/Sema/uninit-variables.c | 2 +- test/SemaCXX/uninit-variables.cpp | 2 +- test/SemaObjC/uninit-variables.m | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 641fa3f07b..5b58ae8ab9 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -867,7 +867,7 @@ def note_uninit_reference_member : Note< def warn_field_is_uninit : Warning<"field is uninitialized when used here">, InGroup; def warn_uninit_var : Warning<"variable %0 is possibly uninitialized when used here">, - InGroup>, DefaultIgnore; + InGroup, DefaultIgnore; def warn_maybe_uninit_var : Warning<"variable %0 is possibly uninitialized when used here">, InGroup, DefaultIgnore; @@ -875,7 +875,7 @@ 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>, DefaultIgnore; + InGroup, DefaultIgnore; def warn_maybe_uninit_var_captured_by_block : Warning< "variable %0 is possibly uninitialized when captured by block">, InGroup, DefaultIgnore; diff --git a/test/Sema/uninit-variables.c b/test/Sema/uninit-variables.c index 79dbfa8895..f6933e0c4b 100644 --- a/test/Sema/uninit-variables.c +++ b/test/Sema/uninit-variables.c @@ -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 x; // expected-note{{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}} diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp index 2bc7fb3254..a016937925 100644 --- a/test/SemaCXX/uninit-variables.cpp +++ b/test/SemaCXX/uninit-variables.cpp @@ -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() { diff --git a/test/SemaObjC/uninit-variables.m b/test/SemaObjC/uninit-variables.m index 63c214053b..22d44384b4 100644 --- a/test/SemaObjC/uninit-variables.m +++ b/test/SemaObjC/uninit-variables.m @@ -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. // Test just to ensure the analysis is working. -- 2.40.0