aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-11-21 23:28:56 +0000
committerTed Kremenek <kremenek@apple.com>2008-11-21 23:28:56 +0000
commitd2bdeed0727c291a1a0037dc4fa80379dafa0687 (patch)
tree405c3bef3ba31adb5fb6b6d3a05baf0843e8530c /lib/Lex/PTHLexer.cpp
parentb93efa3d8fbc9e1209ea6a778f7aeb6a9df5e685 (diff)
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
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index 5c6341f57d..21fb9831a4 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -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;
}