Fixes PR20662.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215672
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!tok::isStringLiteral(Tok.getKind())) {
Diag(PragmaLoc, diag::err__Pragma_malformed);
// Skip this token, and the ')', if present.
- if (Tok.isNot(tok::r_paren))
+ if (Tok.isNot(tok::r_paren) && Tok.isNot(tok::eof))
Lex(Tok);
if (Tok.is(tok::r_paren))
Lex(Tok);
#ifdef macro
#error #define invalid
#endif
+
+_Pragma( // expected-error{{_Pragma takes a parenthesized string literal}}