xref: /llvm-project/clang/include/clang/Basic/DiagnosticParse.h (revision bf17016a92bc8a23d2cdd2b51355dd4eb5019c68)
1 //===--- DiagnosticParse.h - Diagnostics for libparse -----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
10 #define LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
11 
12 #include "clang/Basic/Diagnostic.h"
13 
14 namespace clang {
15 namespace diag {
16 enum {
17 #define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR,      \
18              SHOWINSYSHEADER, SHOWINSYSMACRO, DEFERRABLE, CATEGORY)            \
19   ENUM,
20 #define PARSESTART
21 #include "clang/Basic/DiagnosticParseKinds.inc"
22 #undef DIAG
23   NUM_BUILTIN_PARSE_DIAGNOSTICS
24 };
25 
26 #define DIAG_ENUM(ENUM_NAME)                                                   \
27   namespace ENUM_NAME {                                                        \
28   enum {
29 #define DIAG_ENUM_ITEM(IDX, NAME) NAME = IDX,
30 #define DIAG_ENUM_END()                                                        \
31   }                                                                            \
32   ;                                                                            \
33   }
34 #include "clang/Basic/DiagnosticParseEnums.inc"
35 #undef DIAG_ENUM_END
36 #undef DIAG_ENUM_ITEM
37 #undef DIAG_ENUM
38 } // end namespace diag
39 } // end namespace clang
40 
41 #endif // LLVM_CLANG_BASIC_DIAGNOSTICPARSE_H
42