[cfe-commits] r160706 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp test/Misc/warning-flags.c
Ted Kremenek
kremenek at apple.com
Wed Jul 25 00:12:13 PDT 2012
Author: kremenek
Date: Wed Jul 25 02:12:13 2012
New Revision: 160706
URL: http://llvm.org/viewvc/llvm-project?rev=160706&view=rev
Log:
Promote warn_unknown_analyzer_checker to an error. Addresses <rdar://problem/10987863>.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
cfe/trunk/test/Misc/warning-flags.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=160706&r1=160705&r2=160706&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Wed Jul 25 02:12:13 2012
@@ -107,7 +107,7 @@
"unknown %0 warning specifier: '%1'">,
InGroup<DiagGroup<"unknown-warning-option"> >;
-def warn_unknown_analyzer_checker : Warning<
+def err_unknown_analyzer_checker : Error<
"no analyzer checkers are associated with '%0'">;
def warn_incompatible_analyzer_plugin_api : Warning<
"checker plugin '%0' is not compatible with this version of the analyzer">,
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp?rev=160706&r1=160705&r2=160706&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp Wed Jul 25 02:12:13 2012
@@ -118,7 +118,7 @@
for (unsigned i = 0, e = checkerOpts.size(); i != e; ++i) {
if (checkerOpts[i].isUnclaimed())
- diags.Report(diag::warn_unknown_analyzer_checker)
+ diags.Report(diag::err_unknown_analyzer_checker)
<< checkerOpts[i].getName();
}
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=160706&r1=160705&r2=160706&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Wed Jul 25 02:12:13 2012
@@ -1,4 +1,5 @@
-RUN: diagtool list-warnings | FileCheck %s
+RUN: diagtool list-warnings > %t 2>&1
+RUN: FileCheck --input-file=%t %s
This test serves two purposes:
@@ -17,7 +18,7 @@
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (131):
+CHECK: Warnings without flags (130):
CHECK-NEXT: pp_include_next_absolute_path
CHECK-NEXT: pp_include_next_in_primary
CHECK-NEXT: pp_invalid_string_literal
@@ -144,7 +145,6 @@
CHECK-NEXT: warn_undef_interface_suggest
CHECK-NEXT: warn_undef_protocolref
CHECK-NEXT: warn_undefined_internal
-CHECK-NEXT: warn_unknown_analyzer_checker
CHECK-NEXT: warn_unknown_method_family
CHECK-NEXT: warn_use_out_of_scope_declaration
CHECK-NEXT: warn_weak_identifier_undeclared
More information about the cfe-commits
mailing list