[cfe-commits] r69274 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticOptions.td include/clang/Basic/Makefile

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


Author: lattner
Date: Thu Apr 16 01:17:18 2009
New Revision: 69274

URL: http://llvm.org/viewvc/llvm-project?rev=69274&view=rev
Log:
split diagnostic group definitions out into their own file.

Added:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
Removed:
    cfe/trunk/include/clang/Basic/DiagnosticOptions.td
Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/include/clang/Basic/Makefile

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=69274&r1=69273&r2=69274&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Thu Apr 16 01:17:18 2009
@@ -646,6 +646,7 @@
 		DEDFF87F0F848CE30035BD10 /* TemplateName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemplateName.h; path = clang/AST/TemplateName.h; sourceTree = "<group>"; };
 		DEDFF8870F848CF80035BD10 /* TemplateName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemplateName.cpp; path = lib/AST/TemplateName.cpp; sourceTree = "<group>"; };
 		DEDFFF070F959EE60035BD10 /* Diagnostic.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Diagnostic.td; sourceTree = "<group>"; };
+		DEDFFF530F9704580035BD10 /* DiagnosticGroups.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticGroups.td; sourceTree = "<group>"; };
 		DEEBBD430C19C5D200A9FE82 /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TODO.txt; sourceTree = "<group>"; };
 		DEEBC3B90C2363B800A9FE82 /* CodeGenTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = CodeGenTypes.h; path = lib/CodeGen/CodeGenTypes.h; sourceTree = "<group>"; tabWidth = 2; };
 		DEEBC3BB0C2363BC00A9FE82 /* CodeGenTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = CodeGenTypes.cpp; path = lib/CodeGen/CodeGenTypes.cpp; sourceTree = "<group>"; tabWidth = 2; };
@@ -680,7 +681,6 @@
 		DEF1658F0F8FB3FC0098507F /* GeneratePCH.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeneratePCH.cpp; path = "tools/clang-cc/GeneratePCH.cpp"; sourceTree = "<group>"; };
 		DEF1683F0F9548DC0098507F /* FixItRewriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FixItRewriter.cpp; path = lib/Frontend/FixItRewriter.cpp; sourceTree = "<group>"; };
 		DEF168620F9549250098507F /* FixItRewriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FixItRewriter.h; path = clang/Frontend/FixItRewriter.h; sourceTree = "<group>"; };
-		DEF169050F9645580098507F /* DiagnosticOptions.td */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DiagnosticOptions.td; sourceTree = "<group>"; };
 		DEF169220F9645960098507F /* FrontendDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FrontendDiagnostic.h; path = clang/Frontend/FrontendDiagnostic.h; sourceTree = "<group>"; };
 		DEF1692C0F9645BF0098507F /* AnalysisDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnalysisDiagnostic.h; path = clang/Analysis/AnalysisDiagnostic.h; sourceTree = "<group>"; };
 		DEF2E95E0C5FBD74000C4259 /* InternalsManual.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; name = InternalsManual.html; path = docs/InternalsManual.html; sourceTree = "<group>"; };
@@ -1186,8 +1186,8 @@
 				1A7019EB0F79BC1100FEC4D1 /* DiagnosticCommonKinds.td */,
 				1A7019EC0F79BC1100FEC4D1 /* DiagnosticDriverKinds.td */,
 				1A7019ED0F79BC1100FEC4D1 /* DiagnosticFrontendKinds.td */,
+				DEDFFF530F9704580035BD10 /* DiagnosticGroups.td */,
 				1A7019EE0F79BC1100FEC4D1 /* DiagnosticLexKinds.td */,
-				DEF169050F9645580098507F /* DiagnosticOptions.td */,
 				1A7019EF0F79BC1100FEC4D1 /* DiagnosticParseKinds.td */,
 				1A701A250F79CE1C00FEC4D1 /* DiagnosticSemaKinds.td */,
 				DED7D7330A524295003AD0FB /* FileManager.h */,

Added: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=69274&view=auto

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (added)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Apr 16 01:17:18 2009
@@ -0,0 +1,81 @@
+//==--- DiagnosticGroups.td - Diagnostic Group Definitions ----------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+def ImplicitFunctionDeclare : DiagGroup<"implicit-function-declaration">;
+def Trigraphs : DiagGroup<"trigraphs">;
+
+// Empty DiagGroups: these are recognized by clang but ignored.
+def : DiagGroup<"aggregate-return">;
+def : DiagGroup<"bad-function-cast">;
+def : DiagGroup<"cast-align">;
+def : DiagGroup<"cast-qual">;
+def : DiagGroup<"char-align">;
+def : DiagGroup<"char-subscripts">;
+def : DiagGroup<"declaration-after-statement">;
+def : DiagGroup<"error-implicit-function-declaration">;
+def : DiagGroup<"format-security">;
+def : DiagGroup<"format=2">;
+def : DiagGroup<"format">;
+def : DiagGroup<"four-char-constants">;
+def : DiagGroup<"init-self">;
+def : DiagGroup<"inline">;
+def : DiagGroup<"int-to-pointer-cast">;
+def : DiagGroup<"missing-braces">;
+def : DiagGroup<"missing-declarations">;
+def : DiagGroup<"missing-format-attribute">;
+def : DiagGroup<"nested-externs">;
+def : DiagGroup<"newline-eof">;
+def : DiagGroup<"no-#warnings">;
+def : DiagGroup<"no-comment">;
+def : DiagGroup<"format-y2k">;
+def : DiagGroup<"long-long">;
+def : DiagGroup<"missing-field-initializers">;
+def : DiagGroup<"nonportable-cfstrings">;
+def : DiagGroup<"old-style-definition">;
+def : DiagGroup<"packed">;
+def : DiagGroup<"parentheses">;
+def : DiagGroup<"pointer-arith">;
+def : DiagGroup<"pointer-to-int-cast">;
+def : DiagGroup<"redundant-decls">;
+def : DiagGroup<"return-type">;
+def : DiagGroup<"shadow">;
+def : DiagGroup<"shorten-64-to-32">;
+def : DiagGroup<"sign-compare">;
+def : DiagGroup<"strict-overflow=">;
+def : DiagGroup<"strict-overflow">;
+def : DiagGroup<"strict-prototypes">;
+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 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
+ ]>;
+

Removed: cfe/trunk/include/clang/Basic/DiagnosticOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticOptions.td?rev=69273&view=auto

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticOptions.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticOptions.td (removed)
@@ -1,14 +0,0 @@
-//===--- DiagnosticOptions.td - C Language Family Diagnostic Handling -----===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the TableGen definitions for the diagnostics options.
-//
-//===----------------------------------------------------------------------===//
-
-def UnusedMacrosDiags : Option<"unused-macros", [pp_macro_not_used]>;

Modified: cfe/trunk/include/clang/Basic/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Makefile?rev=69274&r1=69273&r2=69274&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Makefile (original)
+++ cfe/trunk/include/clang/Basic/Makefile Thu Apr 16 01:17:18 2009
@@ -9,12 +9,12 @@
 
 include $(LEVEL)/Makefile.common
 
-$(ObjDir)/Diagnostic%Kinds.inc.tmp : Diagnostic.td Diagnostic%Kinds.td $(TBLGEN)
+$(ObjDir)/Diagnostic%Kinds.inc.tmp : Diagnostic.td DiagnosticGroups.td Diagnostic%Kinds.td $(TBLGEN)
 	$(Echo) "Building Clang $(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) diagnostic tables with tblgen"
 	$(Verb) -$(MKDIR) $(@D)
 	$(Verb) $(TableGen) -gen-clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc.tmp,%,$(@F)) -o $(call SYSPATH, $@) $<
 
-$(ObjDir)/DiagnosticGroups.inc.tmp : Diagnostic.td $(wildcard Diagnostic*Kinds.td) $(TBLGEN)
+$(ObjDir)/DiagnosticGroups.inc.tmp : Diagnostic.td $(wildcard Diagnostic*.td) $(TBLGEN)
 	$(Echo) "Building Clang diagnostic groups with tblgen"
 	$(Verb) -$(MKDIR) $(@D)
 	$(Verb) $(TableGen) -gen-clang-diag-groups -o $(call SYSPATH, $@) $<





More information about the cfe-commits mailing list