aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 19:02:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-13 19:02:56 +0000
commitc5f7459b2d60ad55ed2ab3cfd281d9c718f5a8df (patch)
treec22a849564903771cba8452681bb2741042c0ff5 /lib/Lex/TokenLexer.cpp
parent568eae48a4e19c0359cdcd2a33b8ec9812e4abbc (diff)
Fix issue where a token paste which forms a /* or // would discard the rest of
the input: token-pasting was producing a tok::eof. Patch by Andy Gibbs! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/TokenLexer.cpp')
-rw-r--r--lib/Lex/TokenLexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 696754c741..81c9d0ab7a 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -568,8 +568,8 @@ bool TokenLexer::PasteTokens(Token &Tok) {
<< Buffer.str();
}
- // Do not consume the RHS.
- --CurToken;
+ // An error has occurred so exit loop.
+ break;
}
// Turn ## into 'unknown' to avoid # ## # from looking like a paste