Skip to content
Snippets Groups Projects
Commit d2bdeed0 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This...

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59845 91177308-0d34-0410-b5e6-96231b3b80d8
parent b93efa3d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment