diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index 380f788d22a5..debba38a7020 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -898,7 +898,8 @@ private: bool InCachingLexMode() const { // If the Lexer pointers are 0 and IncludeMacroStack is empty, it means // that we are past EOF, not that we are in CachingLex mode. - return CurPPLexer == 0 && CurTokenLexer == 0 && !IncludeMacroStack.empty(); + return CurPPLexer == 0 && CurTokenLexer == 0 && CurPTHLexer == 0 && + !IncludeMacroStack.empty(); } void EnterCachingLexMode(); void ExitCachingLexMode() {