diff options
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index c36670ca63..dc1f32fb56 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -2151,7 +2151,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok, while (Tok.isNot(tok::eod)) { LastTok = Tok; - if (Tok.isNot(tok::hash) && Tok.isNot(tok::hashhash)) { + if (!Tok.isOneOf(tok::hash, tok::hashat, tok::hashhash)) { MI->AddTokenToBody(Tok); // Get the next token of the macro. @@ -2210,7 +2210,8 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok, MI->AddTokenToBody(LastTok); continue; } else { - Diag(Tok, diag::err_pp_stringize_not_parameter); + Diag(Tok, diag::err_pp_stringize_not_parameter) + << LastTok.is(tok::hashat); // Disable __VA_ARGS__ again. Ident__VA_ARGS__->setIsPoisoned(true); |