forked from OSchip/llvm-project
In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles transitions in the preprocessor state.
llvm-svn: 59845
This commit is contained in:
parent
702f45df58
commit
6b3ced2b15
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue