In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles transitions in the preprocessor state.

llvm-svn: 59845
This commit is contained in:
Ted Kremenek 2008-11-21 23:28:56 +00:00
parent 702f45df58
commit 6b3ced2b15
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ void PTHLexer::DiscardToEndOfLine() {
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;
}