diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 19:02:56 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 19:02:56 +0000 |
| commit | a60742a3d00ee31eca2eb41ef34abf3258dac937 (patch) | |
| tree | c6f68d294c92416ea56544e4c5a7343abd1e57f9 /clang/lib | |
| parent | 429c134d5d447168c828be8510f94193162887d2 (diff) | |
| download | bcm5719-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.cpp | 4 |
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 |

