diff options
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | test/Preprocessor/assembler-with-cpp.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 50a0cb55f7..71483b80c2 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1896,6 +1896,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); diff --git a/test/Preprocessor/assembler-with-cpp.c b/test/Preprocessor/assembler-with-cpp.c index a9c42940a3..65be564786 100644 --- a/test/Preprocessor/assembler-with-cpp.c +++ b/test/Preprocessor/assembler-with-cpp.c @@ -77,3 +77,7 @@ // rdar://8823139 # ## // CHECK-Identifiers-False: # ## + +#define X(a) # # # 1 +X(1) +// CHECK-Identifiers-False: # # # 1 |