Move diagnostic enums into Basic.
authorRichard Trieu <rtrieu@google.com>
Sat, 8 Dec 2018 05:05:03 +0000 (05:05 +0000)
committerRichard Trieu <rtrieu@google.com>
Sat, 8 Dec 2018 05:05:03 +0000 (05:05 +0000)
Move enums from */*Diagnostic.h to Basic/Diagnostic*.h.  Basic/AllDiagnostics.h
needs all the enums and moving the sources to Basic prevents a Basic->*->Basic
dependency loop.  This also allows each Basic/Diagnostics*Kinds.td to have a
header at Basic/Diagnostic*.h (except for Common).  The old headers are kept in place since other packages are still using them.

llvm-svn: 348685

23 files changed:
clang/include/clang/AST/ASTDiagnostic.h
clang/include/clang/AST/CommentDiagnostic.h
clang/include/clang/Analysis/AnalysisDiagnostic.h
clang/include/clang/Basic/AllDiagnostics.h
clang/include/clang/Basic/DiagnosticAST.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticAnalysis.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticComment.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticCrossTU.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticDriver.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticFrontend.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticLex.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticParse.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticRefactoring.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticSema.h [new file with mode: 0644]
clang/include/clang/Basic/DiagnosticSerialization.h [new file with mode: 0644]
clang/include/clang/CrossTU/CrossTUDiagnostic.h
clang/include/clang/Driver/DriverDiagnostic.h
clang/include/clang/Frontend/FrontendDiagnostic.h
clang/include/clang/Lex/LexDiagnostic.h
clang/include/clang/Parse/ParseDiagnostic.h
clang/include/clang/Sema/SemaDiagnostic.h
clang/include/clang/Serialization/SerializationDiagnostic.h
clang/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h

index 2534272..fe92604 100644 (file)
 #define LLVM_CLANG_AST_ASTDIAGNOSTIC_H
 
 #include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/DiagnosticAST.h"
 
 namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define ASTSTART
-#include "clang/Basic/DiagnosticASTKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_AST_DIAGNOSTICS
-    };
-  }  // end namespace diag
-
   /// DiagnosticsEngine argument formatting function for diagnostics that
   /// involve AST nodes.
   ///
index f3a209b..b9816f1 100644 (file)
 #ifndef LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H
 #define LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define COMMENTSTART
-#include "clang/Basic/DiagnosticCommentKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_COMMENT_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticComment.h"
 
 #endif
 
index 8d28971..087ffdc 100644 (file)
 #ifndef LLVM_CLANG_ANALYSIS_ANALYSISDIAGNOSTIC_H
 #define LLVM_CLANG_ANALYSIS_ANALYSISDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define ANALYSISSTART
-#include "clang/Basic/DiagnosticAnalysisKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_ANALYSIS_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticAnalysis.h"
 
 #endif
index afec2d7..6c7f956 100644 (file)
 #ifndef LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H
 #define LLVM_CLANG_BASIC_ALLDIAGNOSTICS_H
 
-#include "clang/AST/ASTDiagnostic.h"
-#include "clang/AST/CommentDiagnostic.h"
-#include "clang/Analysis/AnalysisDiagnostic.h"
-#include "clang/CrossTU/CrossTUDiagnostic.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"
-#include "clang/Serialization/SerializationDiagnostic.h"
-#include "clang/Tooling/Refactoring/RefactoringDiagnostic.h"
+#include "clang/Basic/DiagnosticAST.h"
+#include "clang/Basic/DiagnosticAnalysis.h"
+#include "clang/Basic/DiagnosticComment.h"
+#include "clang/Basic/DiagnosticCrossTU.h"
+#include "clang/Basic/DiagnosticDriver.h"
+#include "clang/Basic/DiagnosticFrontend.h"
+#include "clang/Basic/DiagnosticLex.h"
+#include "clang/Basic/DiagnosticParse.h"
+#include "clang/Basic/DiagnosticSema.h"
+#include "clang/Basic/DiagnosticSerialization.h"
+#include "clang/Basic/DiagnosticRefactoring.h"
 
 namespace clang {
 template <size_t SizeOfStr, typename FieldType>
diff --git a/clang/include/clang/Basic/DiagnosticAST.h b/clang/include/clang/Basic/DiagnosticAST.h
new file mode 100644 (file)
index 0000000..b0e9178
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticAST.h - Diagnostics for the AST library ------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICAST_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICAST_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define ASTSTART
+#include "clang/Basic/DiagnosticASTKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_AST_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICAST_H
diff --git a/clang/include/clang/Basic/DiagnosticAnalysis.h b/clang/include/clang/Basic/DiagnosticAnalysis.h
new file mode 100644 (file)
index 0000000..3748b53
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticAnalysis.h - Diagnostics for libanalysis -----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICANALYSIS_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICANALYSIS_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define ANALYSISSTART
+#include "clang/Basic/DiagnosticAnalysisKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_ANALYSIS_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICANALYSIS_H
diff --git a/clang/include/clang/Basic/DiagnosticComment.h b/clang/include/clang/Basic/DiagnosticComment.h
new file mode 100644 (file)
index 0000000..a6c5f18
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticComment.h - Diagnostics for the AST library --*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICCOMMENT_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICCOMMENT_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define COMMENTSTART
+#include "clang/Basic/DiagnosticCommentKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_COMMENT_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICCOMMENT_H
diff --git a/clang/include/clang/Basic/DiagnosticCrossTU.h b/clang/include/clang/Basic/DiagnosticCrossTU.h
new file mode 100644 (file)
index 0000000..8cff334
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticCrossTU.h - Diagnostics for Cross TU ---------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define CROSSTUSTART
+#include "clang/Basic/DiagnosticCrossTUKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_CROSSTU_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H
diff --git a/clang/include/clang/Basic/DiagnosticDriver.h b/clang/include/clang/Basic/DiagnosticDriver.h
new file mode 100644 (file)
index 0000000..2ab9b3e
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticDriver.h - Diagnostics for libdriver ---------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICDRIVER_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICDRIVER_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define DRIVERSTART
+#include "clang/Basic/DiagnosticDriverKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_DRIVER_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICDRIVER_H
diff --git a/clang/include/clang/Basic/DiagnosticFrontend.h b/clang/include/clang/Basic/DiagnosticFrontend.h
new file mode 100644 (file)
index 0000000..1f066cf
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticFrontend.h - Diagnostics for frontend --------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICFRONTEND_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICFRONTEND_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define FRONTENDSTART
+#include "clang/Basic/DiagnosticFrontendKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_FRONTEND_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICFRONTEND_H
diff --git a/clang/include/clang/Basic/DiagnosticLex.h b/clang/include/clang/Basic/DiagnosticLex.h
new file mode 100644 (file)
index 0000000..6ec4da8
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticLex.h - Diagnostics for liblex ---------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICLEX_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICLEX_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define LEXSTART
+#include "clang/Basic/DiagnosticLexKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_LEX_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICLEX_H
diff --git a/clang/include/clang/Basic/DiagnosticParse.h b/clang/include/clang/Basic/DiagnosticParse.h
new file mode 100644 (file)
index 0000000..2113b03
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticParse.h - Diagnostics for libparse -----------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define PARSESTART
+#include "clang/Basic/DiagnosticParseKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_PARSE_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
diff --git a/clang/include/clang/Basic/DiagnosticRefactoring.h b/clang/include/clang/Basic/DiagnosticRefactoring.h
new file mode 100644 (file)
index 0000000..8d3914f
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticRefactoring.h - ------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define REFACTORINGSTART
+#include "clang/Basic/DiagnosticRefactoringKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_REFACTORING_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H
diff --git a/clang/include/clang/Basic/DiagnosticSema.h b/clang/include/clang/Basic/DiagnosticSema.h
new file mode 100644 (file)
index 0000000..b05b24d
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticSema.h - Diagnostics for libsema -------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICSEMA_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICSEMA_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define SEMASTART
+#include "clang/Basic/DiagnosticSemaKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_SEMA_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICSEMA_H
diff --git a/clang/include/clang/Basic/DiagnosticSerialization.h b/clang/include/clang/Basic/DiagnosticSerialization.h
new file mode 100644 (file)
index 0000000..d19e638
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- DiagnosticSerialization.h - Serialization Diagnostics -*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_BASIC_DIAGNOSTICSERIALIZATION_H
+#define LLVM_CLANG_BASIC_DIAGNOSTICSERIALIZATION_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+namespace diag {
+enum {
+#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
+             SHOWINSYSHEADER, CATEGORY)                                        \
+  ENUM,
+#define SERIALIZATIONSTART
+#include "clang/Basic/DiagnosticSerializationKinds.inc"
+#undef DIAG
+  NUM_BUILTIN_SERIALIZATION_DIAGNOSTICS
+};
+} // end namespace diag
+} // end namespace clang
+
+#endif // LLVM_CLANG_BASIC_DIAGNOSTICSERIALIZATION_H
index dad3830..56c83a5 100644 (file)
 #ifndef LLVM_CLANG_CROSSTU_CROSSTUDIAGNOSTIC_H
 #define LLVM_CLANG_CROSSTU_CROSSTUDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/DiagnosticCrossTU.h"
 
-namespace clang {
-namespace diag {
-enum {
-#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
-             SHOWINSYSHEADER, CATEGORY)                                        \
-  ENUM,
-#define CROSSTUSTART
-#include "clang/Basic/DiagnosticCrossTUKinds.inc"
-#undef DIAG
-  NUM_BUILTIN_CROSSTU_DIAGNOSTICS
-};
-} // end namespace diag
-} // end namespace clang
-
-#endif // LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H
+#endif // LLVM_CLANG_CROSSTU_CROSSTUDIAGNOSTIC_H
index 680338a..ad160ec 100644 (file)
 #ifndef LLVM_CLANG_DRIVER_DRIVERDIAGNOSTIC_H
 #define LLVM_CLANG_DRIVER_DRIVERDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define DRIVERSTART
-#include "clang/Basic/DiagnosticDriverKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_DRIVER_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticDriver.h"
 
 #endif
index 0f37b7e..14a2884 100644 (file)
 #ifndef LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H
 #define LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define FRONTENDSTART
-#include "clang/Basic/DiagnosticFrontendKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_FRONTEND_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticFrontend.h"
 
 #endif
index 5d724c0..3a677b8 100644 (file)
 #ifndef LLVM_CLANG_LEX_LEXDIAGNOSTIC_H
 #define LLVM_CLANG_LEX_LEXDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define LEXSTART
-#include "clang/Basic/DiagnosticLexKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_LEX_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticLex.h"
 
 #endif
index f3a7f3b..c7c6268 100644 (file)
 #ifndef LLVM_CLANG_PARSE_PARSEDIAGNOSTIC_H
 #define LLVM_CLANG_PARSE_PARSEDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define PARSESTART
-#include "clang/Basic/DiagnosticParseKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_PARSE_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticParse.h"
 
 #endif
index 7740d5e..30a2497 100644 (file)
 #ifndef LLVM_CLANG_SEMA_SEMADIAGNOSTIC_H
 #define LLVM_CLANG_SEMA_SEMADIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define SEMASTART
-#include "clang/Basic/DiagnosticSemaKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_SEMA_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticSema.h"
 
 #endif
index d50422a..2decd1c 100644 (file)
 #ifndef LLVM_CLANG_SERIALIZATION_SERIALIZATIONDIAGNOSTIC_H
 #define LLVM_CLANG_SERIALIZATION_SERIALIZATIONDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-
-namespace clang {
-  namespace diag {
-    enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
-             SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM,
-#define SERIALIZATIONSTART
-#include "clang/Basic/DiagnosticSerializationKinds.inc"
-#undef DIAG
-      NUM_BUILTIN_SERIALIZATION_DIAGNOSTICS
-    };
-  }  // end namespace diag
-}  // end namespace clang
+#include "clang/Basic/DiagnosticSerialization.h"
 
 #endif
index 6767dc7..dc1d998 100644 (file)
 #ifndef LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H
 #define LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H
 
-#include "clang/Basic/Diagnostic.h"
-#include "clang/Basic/PartialDiagnostic.h"
-
-namespace clang {
-namespace diag {
-enum {
-#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
-             SHOWINSYSHEADER, CATEGORY)                                        \
-  ENUM,
-#define REFACTORINGSTART
-#include "clang/Basic/DiagnosticRefactoringKinds.inc"
-#undef DIAG
-  NUM_BUILTIN_REFACTORING_DIAGNOSTICS
-};
-} // end namespace diag
-} // end namespace clang
+#include "clang/Basic/DiagnosticRefactoring.h"
 
 #endif // LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H