[cfe-commits] r108199 - /cfe/trunk/lib/Lex/PPCaching.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Jul 12 14:41:41 PDT 2010
Author: akirtzidis
Date: Mon Jul 12 16:41:41 2010
New Revision: 108199
URL: http://llvm.org/viewvc/llvm-project?rev=108199&view=rev
Log:
Remove the check for repeated tok::eofs, we are not supposed to go past eof so this code is
totally unnecessary.
Modified:
cfe/trunk/lib/Lex/PPCaching.cpp
Modified: cfe/trunk/lib/Lex/PPCaching.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPCaching.cpp?rev=108199&r1=108198&r2=108199&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPCaching.cpp (original)
+++ cfe/trunk/lib/Lex/PPCaching.cpp Mon Jul 12 16:41:41 2010
@@ -54,10 +54,7 @@
}
ExitCachingLexMode();
- // True if we consumed everything already.
- bool PastEOF = CurPPLexer == 0 && CurTokenLexer == 0;
- if (!PastEOF)
- Lex(Result);
+ Lex(Result);
if (!isBacktrackEnabled()) {
// All cached tokens were consumed.
@@ -66,12 +63,10 @@
return;
}
- // Cache the lexed token if it's not a repeated tok::eof.
+ // Cache the lexed token.
EnterCachingLexMode();
- if (!PastEOF) {
- CachedTokens.push_back(Result);
- ++CachedLexPos;
- }
+ CachedTokens.push_back(Result);
+ ++CachedLexPos;
}
void Preprocessor::EnterCachingLexMode() {
More information about the cfe-commits
mailing list