[cfe-commits] r69246 - /cfe/trunk/include/clang/Basic/Diagnostic.td

Chris Lattner sabre at nondot.org
Wed Apr 15 17:23:24 PDT 2009


Author: lattner
Date: Wed Apr 15 19:23:21 2009
New Revision: 69246

URL: http://llvm.org/viewvc/llvm-project?rev=69246&view=rev
Log:
add scafolding to represent heirarchical warnings, start with -Wall.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.td

Modified: cfe/trunk/include/clang/Basic/Diagnostic.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.td?rev=69246&r1=69245&r2=69246&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.td (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.td Wed Apr 15 19:23:21 2009
@@ -27,7 +27,10 @@
 def CLASS_ERROR     : DiagClass;
 
 // Diagnostic Groups.
-class DiagGroup<string Name> { string GroupName = Name; }
+class DiagGroup<string Name, list<DiagGroup> subgroups = []> {
+  string GroupName = Name;
+  list<DiagGroup> SubGroups = subgroups;
+}
 class InGroup<DiagGroup G> { DiagGroup Group = G; }
 //class IsGroup<string Name> { DiagGroup Group = DiagGroup<Name>; }
 
@@ -35,11 +38,7 @@
 def Trigraphs : DiagGroup<"trigraphs">;
 
 // Empty DiagGroups: these are recognized by clang but ignored.
-def : DiagGroup<"extra">;
-def : DiagGroup<"">;  // -W
-
 def : DiagGroup<"aggregate-return">;
-def : DiagGroup<"all">;
 def : DiagGroup<"bad-function-cast">;
 def : DiagGroup<"cast-align">;
 def : DiagGroup<"cast-qual">;
@@ -47,7 +46,6 @@
 def : DiagGroup<"char-subscripts">;
 def : DiagGroup<"declaration-after-statement">;
 def : DiagGroup<"error-implicit-function-declaration">;
-def : DiagGroup<"error">;
 def : DiagGroup<"format-security">;
 def : DiagGroup<"format=2">;
 def : DiagGroup<"format">;
@@ -58,7 +56,6 @@
 def : DiagGroup<"missing-braces">;
 def : DiagGroup<"missing-declarations">;
 def : DiagGroup<"missing-format-attribute">;
-def : DiagGroup<"most">;
 def : DiagGroup<"nested-externs">;
 def : DiagGroup<"newline-eof">;
 def : DiagGroup<"no-#warnings">;
@@ -67,9 +64,6 @@
 def : DiagGroup<"long-long">;
 def : DiagGroup<"missing-field-initializers">;
 def : DiagGroup<"nonportable-cfstrings">;
-def : DiagGroup<"parentheses">;
-def : DiagGroup<"strict-selector-match">;
-def : DiagGroup<"nonportable-cfstrings">;
 def : DiagGroup<"old-style-definition">;
 def : DiagGroup<"packed">;
 def : DiagGroup<"parentheses">;
@@ -83,17 +77,35 @@
 def : DiagGroup<"strict-overflow=">;
 def : DiagGroup<"strict-overflow">;
 def : DiagGroup<"strict-prototypes">;
-def : DiagGroup<"switch">;
-def : DiagGroup<"uninitialized">;
-def : DiagGroup<"unknown-pragmas">;
+def : DiagGroup<"strict-selector-match">;
+def Switch         : DiagGroup<"switch">;
+def Uninitialized  : DiagGroup<"uninitialized">;
+def UnknownPragmas : DiagGroup<"unknown-pragmas">;
 def : DiagGroup<"unused-function">;
 def : DiagGroup<"unused-label">;
 def : DiagGroup<"unused-parameter">;
-def : DiagGroup<"unused-value">;
-def : DiagGroup<"unused-variable">;
+def UnusedValue    : DiagGroup<"unused-value">;
+def UnusedVariable : DiagGroup<"unused-variable">;
 def : DiagGroup<"variadic-macros">;
+def VolatileRegisterVar : DiagGroup<"volatile-register-var">;
 def : DiagGroup<"write-strings">;
 
+def : DiagGroup<"extra">;
+def : DiagGroup<"">;  // -W
+def : DiagGroup<"most">;
+
+// Aggregation warning settings.
+def : DiagGroup<"all", [
+    ImplicitFunctionDeclare,
+    Switch,
+    Trigraphs,
+    Uninitialized,
+    UnknownPragmas,
+    UnusedValue,
+    UnusedVariable,
+    VolatileRegisterVar
+ ]>;
+
 
 // All diagnostics emitted by the compiler are an indirect subclass of this.
 class Diagnostic<string text, DiagClass DC, DiagMapping defaultmapping> {





More information about the cfe-commits mailing list