aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPCaching.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-04 06:20:15 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-04 06:20:15 +0000
commitd6aba06861c41ccbc4926e5fe3cecd97b20410c0 (patch)
tree236d9d107a013eced1887f36af86fbdecc04f2d2 /lib/Lex/PPCaching.cpp
parent256fc4d0743d520a2535d6de003aa828f5de8b27 (diff)
Don't treat 'import' as a contextual keyword when we're in a caching lexer, or when modules are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPCaching.cpp')
-rw-r--r--lib/Lex/PPCaching.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Lex/PPCaching.cpp b/lib/Lex/PPCaching.cpp
index 986341b986..0d5e34f0bf 100644
--- a/lib/Lex/PPCaching.cpp
+++ b/lib/Lex/PPCaching.cpp
@@ -42,6 +42,7 @@ void Preprocessor::Backtrack() {
&& "EnableBacktrackAtThisPos was not called!");
CachedLexPos = BacktrackPositions.back();
BacktrackPositions.pop_back();
+ recomputeCurLexerKind();
}
void Preprocessor::CachingLex(Token &Result) {
@@ -74,8 +75,7 @@ void Preprocessor::EnterCachingLexMode() {
return;
PushIncludeMacroStack();
- if (CurLexerKind != CLK_LexAfterModuleImport)
- CurLexerKind = CLK_CachingLexer;
+ CurLexerKind = CLK_CachingLexer;
}