From: Argyrios Kyrtzidis Date: Mon, 28 Feb 2011 19:49:12 +0000 (+0000) Subject: [analyzer] The current UninitializedValuesChecker will go away, remove '-warn-uninit... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=344500e3b78b95e2d911f45a64c5364d346ba799;p=clang [analyzer] The current UninitializedValuesChecker will go away, remove '-warn-uninit-values'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126673 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 46f59168c5..16b8b62df8 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -42,8 +42,6 @@ def analysis_CFGAddImplicitDtors : Flag<"-cfg-add-implicit-dtors">, HelpText<"Add C++ implicit destructors to CFGs for all analyses">; def analysis_CFGAddInitializers : Flag<"-cfg-add-initializers">, HelpText<"Add C++ initializers to CFGs for all analyses">; -def analysis_WarnUninitVals : Flag<"-warn-uninit-values">, - HelpText<"Warn about uses of uninitialized variables">; def analysis_ObjCMemChecker : Flag<"-analyzer-check-objc-mem">, HelpText<"Run the [Core] Foundation reference count checker">; diff --git a/include/clang/Frontend/Analyses.def b/include/clang/Frontend/Analyses.def index 75b52a824c..6350608845 100644 --- a/include/clang/Frontend/Analyses.def +++ b/include/clang/Frontend/Analyses.def @@ -14,9 +14,6 @@ #ifndef ANALYSIS #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) #endif - -ANALYSIS(WarnUninitVals, "warn-uninit-values", - "Warn about uses of uninitialized variables", Code) ANALYSIS(ObjCMemChecker, "analyzer-check-objc-mem", "Run the [Core] Foundation reference count checker", Code) diff --git a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index 787d38d4c9..261e145b04 100644 --- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -318,14 +318,6 @@ void AnalysisConsumer::HandleCode(Decl *D, Actions& actions) { // Analyses //===----------------------------------------------------------------------===// -static void ActionWarnUninitVals(AnalysisConsumer &C, AnalysisManager& mgr, - Decl *D) { - if (CFG* c = mgr.getCFG(D)) { - CheckUninitializedValues(*c, mgr.getASTContext(), mgr.getDiagnostic()); - } -} - - static void ActionExprEngine(AnalysisConsumer &C, AnalysisManager& mgr, Decl *D, TransferFuncs* tf) { diff --git a/test/Analysis/conditional-op-missing-lhs.c b/test/Analysis/conditional-op-missing-lhs.c index 9bb46fa6b9..c2fbd0188b 100644 --- a/test/Analysis/conditional-op-missing-lhs.c +++ b/test/Analysis/conditional-op-missing-lhs.c @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -analyze -analyzer-checker=DeadStores -warn-uninit-values -verify %s +// FIXME: The current UninitializedValuesChecker will go away; replace it and re-enable test. +// XFAIL: * void f1() { diff --git a/test/Analysis/uninit-vals.c b/test/Analysis/uninit-vals.c index e4395e8486..85088734ab 100644 --- a/test/Analysis/uninit-vals.c +++ b/test/Analysis/uninit-vals.c @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -analyze -warn-uninit-values -verify %s +// FIXME: The current UninitializedValuesChecker will go away; replace it and re-enable test. +// XFAIL: * int f1() { int x;