Skip to content

Commit 5983960

Browse files
authored
Merge pull request #34488 from so5462/modify-macro-SR-13774
[DiagnosticsQol] Modify diagnostic macro into single DIAG
2 parents ee9b12f + 2855ef3 commit 5983960

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/AST/DiagnosticEngine.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,13 @@ static_assert(sizeof(storedDiagnosticInfos) / sizeof(StoredDiagnosticInfo) ==
9393
"array size mismatch");
9494

9595
static constexpr const char * const diagnosticStrings[] = {
96-
#define ERROR(ID, Options, Text, Signature) Text,
97-
#define WARNING(ID, Options, Text, Signature) Text,
98-
#define NOTE(ID, Options, Text, Signature) Text,
99-
#define REMARK(ID, Options, Text, Signature) Text,
96+
#define DIAG(KIND, ID, Options, Text, Signature) Text,
10097
#include "swift/AST/DiagnosticsAll.def"
10198
"<not a diagnostic>",
10299
};
103100

104101
static constexpr const char *const debugDiagnosticStrings[] = {
105-
#define ERROR(ID, Options, Text, Signature) Text " [" #ID "]",
106-
#define WARNING(ID, Options, Text, Signature) Text " [" #ID "]",
107-
#define NOTE(ID, Options, Text, Signature) Text " [" #ID "]",
108-
#define REMARK(ID, Options, Text, Signature) Text " [" #ID "]",
102+
#define DIAG(KIND, ID, Options, Text, Signature) Text " [" #ID "]",
109103
#include "swift/AST/DiagnosticsAll.def"
110104
"<not a diagnostic>",
111105
};

0 commit comments

Comments
 (0)