Make sure the assembler-with-cpp hack for "#" works with multiple "#"s in

succession. Fixes PR16363.

llvm-svn: 184240
This commit is contained in:
Eli Friedman 2013-06-18 21:33:38 +00:00
parent 1470e2077a
commit cdf8b88285
2 changed files with 6 additions and 0 deletions

View File

@ -1920,6 +1920,8 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok,
// confused.
if (getLangOpts().AsmPreprocessor && Tok.isNot(tok::eod)) {
LastTok.setKind(tok::unknown);
MI->AddTokenToBody(LastTok);
continue;
} else {
Diag(Tok, diag::err_pp_stringize_not_parameter);
ReleaseMacroInfo(MI);

View File

@ -77,3 +77,7 @@
// rdar://8823139
# ##
// CHECK-Identifiers-False: # ##
#define X(a) # # # 1
X(1)
// CHECK-Identifiers-False: # # # 1