diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-23 17:32:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-23 17:32:45 +0000 |
commit | f1538de18370c202263d7d1bc326cbc2c5434e1d (patch) | |
tree | 9d9af3edd60f7d9fa61b66f463c840b8ed80ed78 /lib/Lex | |
parent | 68ac94a8d7c7a967ace59c565736d07e80de77e7 (diff) |
The individual pieces of an invalid paste as still candidates for expansion.
This matters in assembler mode, where this is silently allowed.
This fixes rdar://6709206.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/TokenLexer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp index 1935914e0e..ec48690b35 100644 --- a/lib/Lex/TokenLexer.cpp +++ b/lib/Lex/TokenLexer.cpp @@ -448,7 +448,9 @@ bool TokenLexer::PasteTokens(Token &Tok) { if (!PP.getLangOptions().AsmPreprocessor) PP.Diag(PasteOpLoc, diag::err_pp_bad_paste) << std::string(Buffer.begin(), Buffer.end()-1); - return false; + + // Do not consume the RHS. + --CurToken; } // Turn ## into 'unknown' to avoid # ## # from looking like a paste |