diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | clang/test/Preprocessor/assembler-with-cpp.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 3e3312a9261..c25e317b42d 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -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); diff --git a/clang/test/Preprocessor/assembler-with-cpp.c b/clang/test/Preprocessor/assembler-with-cpp.c index a9c42940a31..65be5647861 100644 --- a/clang/test/Preprocessor/assembler-with-cpp.c +++ b/clang/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 |