[cfe-commits] r159893 - in /cfe/trunk: test/Misc/warning-flags.c tools/diagtool/ListWarnings.cpp
Ted Kremenek
kremenek at apple.com
Fri Jul 6 23:30:31 PDT 2012
Author: kremenek
Date: Sat Jul 7 01:30:31 2012
New Revision: 159893
URL: http://llvm.org/viewvc/llvm-project?rev=159893&view=rev
Log:
Enhance 'diagtool list-warnings' to report number of diagnostics covered directly under -Wpedantic, and enhance warning-flags.c test to test that this set does not grow.
Modified:
cfe/trunk/test/Misc/warning-flags.c
cfe/trunk/tools/diagtool/ListWarnings.cpp
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=159893&r1=159892&r2=159893&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Sat Jul 7 01:30:31 2012
@@ -177,3 +177,8 @@
CHECK-NEXT: warn_weak_identifier_undeclared
CHECK-NEXT: warn_weak_import
+The list of warnings in -Wpedenatic should NEVER grow.
+
+CHECK: Number in -Wpedantic (not covered by other -W flags): 71
+
+
Modified: cfe/trunk/tools/diagtool/ListWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/diagtool/ListWarnings.cpp?rev=159893&r1=159892&r2=159893&view=diff
==============================================================================
--- cfe/trunk/tools/diagtool/ListWarnings.cpp (original)
+++ cfe/trunk/tools/diagtool/ListWarnings.cpp Sat Jul 7 01:30:31 2012
@@ -98,6 +98,10 @@
out << " Average number of diagnostics per flag: "
<< llvm::format("%.4g", avgDiagsPerFlag) << '\n';
+ out << " Number in -Wpedantic (not covered by other -W flags): "
+ << flagHistogram.GetOrCreateValue("pedantic").getValue().size()
+ << '\n';
+
out << '\n';
return 0;
More information about the cfe-commits
mailing list