summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp b/gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp
index f5e8cdc25d3..9758557d7b4 100644
--- a/gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp
+++ b/gnu/llvm/tools/clang/lib/Lex/PPCaching.cpp
@@ -105,8 +105,10 @@ void Preprocessor::CachingLex(Token &Result) {
}
void Preprocessor::EnterCachingLexMode() {
- if (InCachingLexMode())
+ if (InCachingLexMode()) {
+ assert(CurLexerKind == CLK_CachingLexer && "Unexpected lexer kind");
return;
+ }
PushIncludeMacroStack();
CurLexerKind = CLK_CachingLexer;