BalancedDelimiterTracker T(*this, tok::l_paren);
if (T.consumeOpen()) {
Diag(Tok, diag::err_expected_lparen);
+ SkipMalformedDecl();
return 0;
}
ExprResult AssertExpr(ParseConstantExpression());
if (AssertExpr.isInvalid()) {
- SkipUntil(tok::semi);
+ SkipMalformedDecl();
return 0;
}
if (!isTokenStringLiteral()) {
Diag(Tok, diag::err_expected_string_literal);
- SkipUntil(tok::semi);
+ SkipMalformedDecl();
return 0;
}
ExprResult AssertMessage(ParseStringLiteralExpression());
if (AssertMessage.isInvalid()) {
- SkipUntil(tok::semi);
+ SkipMalformedDecl();
return 0;
}
// pedantically warn on it
int *const const p = 0; // expected-warning {{duplicate 'const' declaration specifier}}
const const int *q = 0; // expected-warning {{duplicate 'const' declaration specifier}}
+
+static_assert(something, ""); // expected-error {{undeclared identifier}}