summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/TokenLexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-23 17:32:45 +0000
committerChris Lattner <sabre@nondot.org>2009-03-23 17:32:45 +0000
commit5030e5eabe6a0a925758af0f38242b5ac186f5ac (patch)
treed098151a780257d9ca9833503a04672817a4045f /clang/lib/Lex/TokenLexer.cpp
parentb294d196b309c7a39ecded3d5eae99ac1340b2b2 (diff)
downloadbcm5719-llvm-5030e5eabe6a0a925758af0f38242b5ac186f5ac.tar.gz
bcm5719-llvm-5030e5eabe6a0a925758af0f38242b5ac186f5ac.zip
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. llvm-svn: 67539
Diffstat (limited to 'clang/lib/Lex/TokenLexer.cpp')
-rw-r--r--clang/lib/Lex/TokenLexer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp
index 1935914e0e1..ec48690b35b 100644
--- a/clang/lib/Lex/TokenLexer.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud