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
diff --git a/lib/Lex/TokenLexer.cpp b/lib/Lex/TokenLexer.cpp
index 1935914..ec48690 100644
--- a/lib/Lex/TokenLexer.cpp
+++ b/lib/Lex/TokenLexer.cpp
@@ -448,7 +448,9 @@
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