From 76cd95d3a63425f6b1b074902505943213e12f70 Mon Sep 17 00:00:00 2001 From: Peter Goodman Date: Mon, 25 Sep 2023 18:54:18 -0400 Subject: [PATCH] Bug fix. --- clang/lib/Lex/PPLexerChange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp index 476943da4237c4..d188b4d4556b71 100644 --- a/clang/lib/Lex/PPLexerChange.cpp +++ b/clang/lib/Lex/PPLexerChange.cpp @@ -634,7 +634,7 @@ bool Preprocessor::HandleEndOfTokenLexer(Token &Result) { "Ending a macro when currently in a #include file!"); // Tell us about the end of macro expansions. - if (CurTokenLexer && CurTokenLexer->Macro) { + if (CurTokenLexer && CurTokenLexer->Macro && Callbacks) { Callbacks->Event(CurTokenLexer->MacroNameTok, PPCallbacks::EndMacroExpansion, reinterpret_cast(CurTokenLexer->Macro));