]> granicus.if.org Git - clang/commitdiff
In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles...
authorTed Kremenek <kremenek@apple.com>
Fri, 21 Nov 2008 23:28:56 +0000 (23:28 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 21 Nov 2008 23:28:56 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59845 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PTHLexer.cpp

index 5c6341f57dc74b1288c2dfb69e805fff582e5f40..21fb9831a4ed32f3412969abc343b40812aef266 100644 (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;
 }