Author: rtrieu Date: Fri Dec 7 21:05:03 2018 New Revision: 348685 URL: http://llvm.org/viewvc/llvm-project?rev=348685&view=rev Log: Move diagnostic enums into Basic.
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. Added: cfe/trunk/include/clang/Basic/DiagnosticAST.h - copied, changed from r348541, cfe/trunk/include/clang/AST/ASTDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticAnalysis.h - copied, changed from r348541, cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticComment.h - copied, changed from r348541, cfe/trunk/include/clang/AST/CommentDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticCrossTU.h - copied, changed from r348541, cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticDriver.h - copied, changed from r348541, cfe/trunk/include/clang/Driver/DriverDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticFrontend.h - copied, changed from r348541, cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticLex.h - copied, changed from r348541, cfe/trunk/include/clang/Lex/LexDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticParse.h - copied, changed from r348541, cfe/trunk/include/clang/Parse/ParseDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticRefactoring.h - copied, changed from r348541, cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticSema.h - copied, changed from r348541, cfe/trunk/include/clang/Sema/SemaDiagnostic.h cfe/trunk/include/clang/Basic/DiagnosticSerialization.h - copied, changed from r348541, cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h Modified: cfe/trunk/include/clang/AST/ASTDiagnostic.h cfe/trunk/include/clang/AST/CommentDiagnostic.h cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h cfe/trunk/include/clang/Basic/AllDiagnostics.h cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.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/include/clang/Serialization/SerializationDiagnostic.h cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h Modified: cfe/trunk/include/clang/AST/ASTDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/ASTDiagnostic.h (original) +++ cfe/trunk/include/clang/AST/ASTDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -11,19 +11,9 @@ #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. /// Modified: cfe/trunk/include/clang/AST/CommentDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CommentDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/CommentDiagnostic.h (original) +++ cfe/trunk/include/clang/AST/CommentDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,20 +10,7 @@ #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 Modified: cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h (original) +++ cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Basic/AllDiagnostics.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AllDiagnostics.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/AllDiagnostics.h (original) +++ cfe/trunk/include/clang/Basic/AllDiagnostics.h Fri Dec 7 21:05:03 2018 @@ -15,17 +15,17 @@ #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> Copied: cfe/trunk/include/clang/Basic/DiagnosticAST.h (from r348541, cfe/trunk/include/clang/AST/ASTDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticAST.h?p2=cfe/trunk/include/clang/Basic/DiagnosticAST.h&p1=cfe/trunk/include/clang/AST/ASTDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/ASTDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticAST.h Fri Dec 7 21:05:03 2018 @@ -1,4 +1,4 @@ -//===--- ASTDiagnostic.h - Diagnostics for the AST library ------*- C++ -*-===// +//===--- DiagnosticAST.h - Diagnostics for the AST library ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,41 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_AST_ASTDIAGNOSTIC_H -#define LLVM_CLANG_AST_ASTDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_AST_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang - /// DiagnosticsEngine argument formatting function for diagnostics that - /// involve AST nodes. - /// - /// This function formats diagnostic arguments for various AST nodes, - /// including types, declaration names, nested name specifiers, and - /// declaration contexts, into strings that can be printed as part of - /// diagnostics. It is meant to be used as the argument to - /// \c DiagnosticsEngine::SetArgToStringFn(), where the cookie is an \c - /// ASTContext pointer. - void FormatASTNodeDiagnosticArgument( - DiagnosticsEngine::ArgumentKind Kind, - intptr_t Val, - StringRef Modifier, - StringRef Argument, - ArrayRef<DiagnosticsEngine::ArgumentValue> PrevArgs, - SmallVectorImpl<char> &Output, - void *Cookie, - ArrayRef<intptr_t> QualTypeVals); -} // end namespace clang - -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICAST_H Copied: cfe/trunk/include/clang/Basic/DiagnosticAnalysis.h (from r348541, cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticAnalysis.h?p2=cfe/trunk/include/clang/Basic/DiagnosticAnalysis.h&p1=cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Analysis/AnalysisDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticAnalysis.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_ANALYSIS_ANALYSISDIAGNOSTIC_H -#define LLVM_CLANG_ANALYSIS_ANALYSISDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_ANALYSIS_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICANALYSIS_H Copied: cfe/trunk/include/clang/Basic/DiagnosticComment.h (from r348541, cfe/trunk/include/clang/AST/CommentDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticComment.h?p2=cfe/trunk/include/clang/Basic/DiagnosticComment.h&p1=cfe/trunk/include/clang/AST/CommentDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/AST/CommentDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticComment.h Fri Dec 7 21:05:03 2018 @@ -1,4 +1,4 @@ -//===--- CommentDiagnostic.h - Diagnostics for the AST library --*- C++ -*-===// +//===--- DiagnosticComment.h - Diagnostics for the AST library --*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,23 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H -#define LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_COMMENT_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang +#endif // LLVM_CLANG_BASIC_DIAGNOSTICCOMMENT_H Copied: cfe/trunk/include/clang/Basic/DiagnosticCrossTU.h (from r348541, cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCrossTU.h?p2=cfe/trunk/include/clang/Basic/DiagnosticCrossTU.h&p1=cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticCrossTU.h Fri Dec 7 21:05:03 2018 @@ -1,4 +1,4 @@ -//===--- CrossTUDiagnostic.h - Diagnostics for Cross TU ---------*- C++ -*-===// +//===--- DiagnosticCrossTU.h - Diagnostics for Cross TU ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_CROSSTU_CROSSTUDIAGNOSTIC_H -#define LLVM_CLANG_CROSSTU_CROSSTUDIAGNOSTIC_H +#ifndef LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H +#define LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H #include "clang/Basic/Diagnostic.h" @@ -26,4 +26,4 @@ enum { } // end namespace diag } // end namespace clang -#endif // LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H +#endif // LLVM_CLANG_BASIC_DIAGNOSTICCROSSTU_H Copied: cfe/trunk/include/clang/Basic/DiagnosticDriver.h (from r348541, cfe/trunk/include/clang/Driver/DriverDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriver.h?p2=cfe/trunk/include/clang/Basic/DiagnosticDriver.h&p1=cfe/trunk/include/clang/Driver/DriverDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Driver/DriverDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticDriver.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_DRIVER_DRIVERDIAGNOSTIC_H -#define LLVM_CLANG_DRIVER_DRIVERDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_DRIVER_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICDRIVER_H Copied: cfe/trunk/include/clang/Basic/DiagnosticFrontend.h (from r348541, cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontend.h?p2=cfe/trunk/include/clang/Basic/DiagnosticFrontend.h&p1=cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticFrontend.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H -#define LLVM_CLANG_FRONTEND_FRONTENDDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_FRONTEND_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICFRONTEND_H Copied: cfe/trunk/include/clang/Basic/DiagnosticLex.h (from r348541, cfe/trunk/include/clang/Lex/LexDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLex.h?p2=cfe/trunk/include/clang/Basic/DiagnosticLex.h&p1=cfe/trunk/include/clang/Lex/LexDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Lex/LexDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticLex.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_LEX_LEXDIAGNOSTIC_H -#define LLVM_CLANG_LEX_LEXDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_LEX_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICLEX_H Copied: cfe/trunk/include/clang/Basic/DiagnosticParse.h (from r348541, cfe/trunk/include/clang/Parse/ParseDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParse.h?p2=cfe/trunk/include/clang/Basic/DiagnosticParse.h&p1=cfe/trunk/include/clang/Parse/ParseDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Parse/ParseDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticParse.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_PARSEDIAGNOSTIC_H -#define LLVM_CLANG_PARSE_PARSEDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_PARSE_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H Copied: cfe/trunk/include/clang/Basic/DiagnosticRefactoring.h (from r348541, cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticRefactoring.h?p2=cfe/trunk/include/clang/Basic/DiagnosticRefactoring.h&p1=cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticRefactoring.h Fri Dec 7 21:05:03 2018 @@ -1,4 +1,4 @@ -//===--- RefactoringDiagnostic.h - ------------------------------*- C++ -*-===// +//===--- DiagnosticRefactoring.h - ------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,11 +7,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H -#define LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H +#ifndef LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H +#define LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H #include "clang/Basic/Diagnostic.h" -#include "clang/Basic/PartialDiagnostic.h" namespace clang { namespace diag { @@ -27,4 +26,4 @@ enum { } // end namespace diag } // end namespace clang -#endif // LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGDIAGNOSTIC_H +#endif // LLVM_CLANG_BASIC_DIAGNOSTICREFACTORING_H Copied: cfe/trunk/include/clang/Basic/DiagnosticSema.h (from r348541, cfe/trunk/include/clang/Sema/SemaDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSema.h?p2=cfe/trunk/include/clang/Basic/DiagnosticSema.h&p1=cfe/trunk/include/clang/Sema/SemaDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Sema/SemaDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticSema.h Fri Dec 7 21:05:03 2018 @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SEMA_SEMADIAGNOSTIC_H -#define LLVM_CLANG_SEMA_SEMADIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_SEMA_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICSEMA_H Copied: cfe/trunk/include/clang/Basic/DiagnosticSerialization.h (from r348541, cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h) URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSerialization.h?p2=cfe/trunk/include/clang/Basic/DiagnosticSerialization.h&p1=cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h&r1=348541&r2=348685&rev=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h (original) +++ cfe/trunk/include/clang/Basic/DiagnosticSerialization.h Fri Dec 7 21:05:03 2018 @@ -1,4 +1,4 @@ -//===--- SerializationDiagnostic.h - Serialization Diagnostics -*- C++ -*-===// +//===--- DiagnosticSerialization.h - Serialization Diagnostics -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,22 +7,23 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SERIALIZATION_SERIALIZATIONDIAGNOSTIC_H -#define LLVM_CLANG_SERIALIZATION_SERIALIZATIONDIAGNOSTIC_H +#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, +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 + NUM_BUILTIN_SERIALIZATION_DIAGNOSTICS +}; +} // end namespace diag +} // end namespace clang -#endif +#endif // LLVM_CLANG_BASIC_DIAGNOSTICSERIALIZATION_H Modified: cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h (original) +++ cfe/trunk/include/clang/CrossTU/CrossTUDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,20 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Driver/DriverDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/DriverDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Driver/DriverDiagnostic.h (original) +++ cfe/trunk/include/clang/Driver/DriverDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h (original) +++ cfe/trunk/include/clang/Frontend/FrontendDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Lex/LexDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/LexDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Lex/LexDiagnostic.h (original) +++ cfe/trunk/include/clang/Lex/LexDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Parse/ParseDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/ParseDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Parse/ParseDiagnostic.h (original) +++ cfe/trunk/include/clang/Parse/ParseDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Sema/SemaDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/SemaDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Sema/SemaDiagnostic.h (original) +++ cfe/trunk/include/clang/Sema/SemaDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h (original) +++ cfe/trunk/include/clang/Serialization/SerializationDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,19 +10,6 @@ #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 Modified: cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h?rev=348685&r1=348684&r2=348685&view=diff ============================================================================== --- cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h (original) +++ cfe/trunk/include/clang/Tooling/Refactoring/RefactoringDiagnostic.h Fri Dec 7 21:05:03 2018 @@ -10,21 +10,6 @@ #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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits