From 5468a6efb1a01ed8f4ca4688082cb29d8acf6e77 Mon Sep 17 00:00:00 2001 From: ykiko Date: Thu, 23 Apr 2026 05:01:59 +0800 Subject: [PATCH] fix: use variadic DIAG macro for LLVM version compatibility Co-Authored-By: Claude Opus 4.6 --- src/compile/diagnostic.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/compile/diagnostic.cpp b/src/compile/diagnostic.cpp index 344c048f..97a1dc7e 100644 --- a/src/compile/diagnostic.cpp +++ b/src/compile/diagnostic.cpp @@ -16,19 +16,7 @@ namespace clice { llvm::StringRef DiagnosticID::diagnostic_code() const { switch(value) { -#define DIAG(ENUM, \ - CLASS, \ - DEFAULT_MAPPING, \ - DESC, \ - GROPU, \ - SFINAE, \ - NOWERROR, \ - SHOWINSYSHEADER, \ - SHOWINSYSMACRO, \ - DEFERRABLE, \ - CATEGORY, \ - DIAGID, \ - FLAGS) \ +#define DIAG(ENUM, ...) \ case clang::diag::ENUM: return #ENUM; #include "clang/Basic/DiagnosticASTKinds.inc" #include "clang/Basic/DiagnosticAnalysisKinds.inc"