'final', and don't accept (then silently discard) braced init lists in C++98
new-expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142048
91177308-0d34-0410-b5e6-
96231b3b80d8
Ident_override = &PP.getIdentifierTable().get("override");
}
- if (II == Ident_final)
+ if (II == Ident_final) {
FinalLoc = ConsumeToken();
- if (!getLang().CPlusPlus0x)
- Diag(FinalLoc, diag::ext_override_control_keyword) << "final";
+ if (!getLang().CPlusPlus0x)
+ Diag(FinalLoc, diag::ext_override_control_keyword) << "final";
+ }
}
if (Tok.is(tok::colon)) {
SkipUntil(tok::semi, /*StopAtSemi=*/true, /*DontConsume=*/true);
return ExprError();
}
- } else if (Tok.is(tok::l_brace)) {
+ } else if (Tok.is(tok::l_brace) && getLang().CPlusPlus0x) {
// FIXME: Have to communicate the init-list to ActOnCXXNew.
ParseBraceInitializer();
}