[cfe-commits] r59845 - /cfe/trunk/lib/Lex/PTHLexer.cpp
Ted Kremenek
kremenek at apple.com
Fri Nov 21 15:29:15 PST 2008
Author: kremenek
Date: Fri Nov 21 17:28:56 2008
New Revision: 59845
URL: http://llvm.org/viewvc/llvm-project?rev=59845&view=rev
Log:
In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles transitions in the preprocessor state.
Modified:
cfe/trunk/lib/Lex/PTHLexer.cpp
Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=59845&r1=59844&r2=59845&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Fri Nov 21 17:28:56 2008
@@ -116,7 +116,8 @@
return;
// Find the first token that is not the start of the *current* line.
- for (AdvanceToken(); !AtLastToken(); AdvanceToken())
+ Token T;
+ for (Lex(T); !AtLastToken(); Lex(T))
if (GetToken().isAtStartOfLine())
return;
}
More information about the cfe-commits
mailing list