Skip to content

Commit 96af3d1

Browse files
committed
Fix build for Clang 21
1 parent 9c819d5 commit 96af3d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

generator/preprocessorcallback.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ void PreprocessorCallback::MacroExpands(const clang::Token &MacroNameTok, MyMacr
8787
// Temporarily change the diagnostics object so that we ignore any generated
8888
// diagnostics from this pass.
8989
clang::DiagnosticsEngine TmpDiags(PP.getDiagnostics().getDiagnosticIDs(),
90+
#if CLANG_VERSION_MAJOR >= 21
91+
PP.getDiagnostics().getDiagnosticOptions(),
92+
#else
9093
&PP.getDiagnostics().getDiagnosticOptions(),
94+
#endif
9195
new clang::IgnoringDiagConsumer);
9296

9397
disabled = true;

0 commit comments

Comments
 (0)