[cfe-commits] r69175 - in /cfe/trunk: include/clang/AST/ASTDiagnostic.h include/clang/Analysis/AnalysisDiagnostic.h include/clang/Basic/Diagnostic.h include/clang/Driver/DriverDiagnostic.h include/clang/Frontend/FrontendDiagnostic.h include/clang/Lex/LexDiagnostic.h include/clang/Parse/ParseDiagnostic.h include/clang/Sema/SemaDiagnostic.h lib/Basic/Diagnostic.cpp

Chris Lattner sabre at nondot.org
Wed Apr 15 09:44:14 PDT 2009


Author: lattner
Date: Wed Apr 15 11:44:12 2009
New Revision: 69175

URL: http://llvm.org/viewvc/llvm-project?rev=69175&view=rev
Log:
Tblgen now passes the default mapping explicitly, instead of having it 
be tied to the diag class.  This requires an LLVM tree update.

Modified:
    cfe/trunk/include/clang/AST/ASTDiagnostic.h
    cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h
    cfe/trunk/include/clang/Basic/Diagnostic.h
    cfe/trunk/include/clang/Driver/DriverDiagnostic.h
    cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h
    cfe/trunk/include/clang/Lex/LexDiagnostic.h
    cfe/trunk/include/clang/Parse/ParseDiagnostic.h
    cfe/trunk/include/clang/Sema/SemaDiagnostic.h
    cfe/trunk/lib/Basic/Diagnostic.cpp

Modified: cfe/trunk/include/clang/AST/ASTDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ASTDiagnostic.h (original)
+++ cfe/trunk/include/clang/AST/ASTDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define ASTSTART
 #include "clang/Basic/DiagnosticASTKinds.inc"
 #undef DIAG

Modified: cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h (original)
+++ cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define ANALYSISSTART
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG

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

==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Wed Apr 15 11:44:12 2009
@@ -49,7 +49,7 @@
 
     // Get typedefs for common diagnostics.
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #include "clang/Basic/DiagnosticCommonKinds.inc"
       NUM_BUILTIN_COMMON_DIAGNOSTICS
 #undef DIAG

Modified: cfe/trunk/include/clang/Driver/DriverDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/DriverDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/DriverDiagnostic.h (original)
+++ cfe/trunk/include/clang/Driver/DriverDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define DRIVERSTART
 #include "clang/Basic/DiagnosticDriverKinds.inc"
 #undef DIAG

Modified: cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define FRONTENDSTART
 #include "clang/Basic/DiagnosticFrontendKinds.inc"
 #undef DIAG

Modified: cfe/trunk/include/clang/Lex/LexDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/LexDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/LexDiagnostic.h (original)
+++ cfe/trunk/include/clang/Lex/LexDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define LEXSTART
 #include "clang/Basic/DiagnosticLexKinds.inc"
 #undef DIAG

Modified: cfe/trunk/include/clang/Parse/ParseDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/ParseDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/ParseDiagnostic.h (original)
+++ cfe/trunk/include/clang/Parse/ParseDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define PARSESTART
 #include "clang/Basic/DiagnosticParseKinds.inc"
 #undef DIAG

Modified: cfe/trunk/include/clang/Sema/SemaDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/SemaDiagnostic.h?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/include/clang/Sema/SemaDiagnostic.h (original)
+++ cfe/trunk/include/clang/Sema/SemaDiagnostic.h Wed Apr 15 11:44:12 2009
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag { 
     enum {
-#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC) ENUM,
 #define SEMASTART
 #include "clang/Basic/DiagnosticSemaKinds.inc"
 #undef DIAG

Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=69175&r1=69174&r2=69175&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Wed Apr 15 11:44:12 2009
@@ -42,15 +42,8 @@
   unsigned Mapping : 2;
 };
 
-#define NOTE      diag::MAP_IGNORE
-#define WARNING   diag::MAP_WARNING
-#define EXTENSION diag::MAP_IGNORE
-#define EXTWARN   diag::MAP_WARNING
-#define ERROR     diag::MAP_ERROR
-#define FATAL     diag::MAP_FATAL
-
 static const DefaultMappingInfo DefaultMappings[] = {
-#define DIAG(ENUM,CLASS,DESC) { diag::ENUM, CLASS },
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) { diag::ENUM, DEFAULT_MAPPING },
 #include "clang/Basic/DiagnosticCommonKinds.inc"
 #include "clang/Basic/DiagnosticDriverKinds.inc"
 #include "clang/Basic/DiagnosticFrontendKinds.inc"
@@ -62,16 +55,6 @@
 { 0, 0 }
 };
 
-#undef DIAG
-#undef NOTE
-#undef WARNING
-#undef EXTENSION
-#undef EXTWARN
-#undef ERROR
-#undef FATAL
-
-
-
 // Diagnostic classes.
 enum {
   NOTE       = 0x01,
@@ -83,7 +66,7 @@
 };
 
 /// DiagnosticClasses - The class for each diagnostic.
-#define DIAG(ENUM,CLASS,DESC) CLASS,
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) CLASS,
 static unsigned char DiagnosticClassesCommon[] = {
 #include "clang/Basic/DiagnosticCommonKinds.inc"
   0
@@ -145,7 +128,7 @@
 
 /// DiagnosticText - An english message to print for the diagnostic.  These
 /// should be localized.
-#define DIAG(ENUM,CLASS,DESC) DESC,
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) DESC,
 static const char * const DiagnosticTextCommon[] = {
 #include "clang/Basic/DiagnosticCommonKinds.inc"
   0





More information about the cfe-commits mailing list