From 96af3d1430a79d8dddb90b1e98fe96d7d4e0d764 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Wed, 22 Oct 2025 12:04:14 +0200 Subject: [PATCH] Fix build for Clang 21 --- generator/preprocessorcallback.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/preprocessorcallback.cpp b/generator/preprocessorcallback.cpp index 570430d..e3e1a4c 100644 --- a/generator/preprocessorcallback.cpp +++ b/generator/preprocessorcallback.cpp @@ -87,7 +87,11 @@ void PreprocessorCallback::MacroExpands(const clang::Token &MacroNameTok, MyMacr // Temporarily change the diagnostics object so that we ignore any generated // diagnostics from this pass. clang::DiagnosticsEngine TmpDiags(PP.getDiagnostics().getDiagnosticIDs(), +#if CLANG_VERSION_MAJOR >= 21 + PP.getDiagnostics().getDiagnosticOptions(), +#else &PP.getDiagnostics().getDiagnosticOptions(), +#endif new clang::IgnoringDiagConsumer); disabled = true;