summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commita60742a3d00ee31eca2eb41ef34abf3258dac937 (patch)
treec6f68d294c92416ea56544e4c5a7343abd1e57f9 /clang/lib
parent429c134d5d447168c828be8510f94193162887d2 (diff)
downloadbcm5719-llvm-a60742a3d00ee31eca2eb41ef34abf3258dac937.tar.gz
bcm5719-llvm-a60742a3d00ee31eca2eb41ef34abf3258dac937.zip
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! llvm-svn: 158412
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/TokenLexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp
index 696754c7416..81c9d0ab7ae 100644
--- a/clang/lib/Lex/TokenLexer.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud