Fixup __extension__ i = 1 parsing. Thanks Eli!

llvm-svn: 71927
This commit is contained in:
Mike Stump 2009-05-16 04:31:34 +00:00
parent 83d008614f
commit b9075ae9f7
2 changed files with 2 additions and 3 deletions

View File

@ -225,7 +225,7 @@ Parser::ParseExpressionWithLeadingAt(SourceLocation AtLoc) {
/// process of disambiguating between an expression and a declaration.
Parser::OwningExprResult
Parser::ParseExpressionWithLeadingExtension(SourceLocation ExtLoc) {
OwningExprResult LHS(ParseAssignmentExpression());
OwningExprResult LHS(ParseCastExpression(false));
if (LHS.isInvalid()) return move(LHS);
LHS = Actions.ActOnUnaryOp(CurScope, ExtLoc, tok::kw___extension__,

View File

@ -10,7 +10,6 @@ void foo() {
throw 1;
throw;
1 ? throw : (void)42;
// gcc doesn't parse the below, but we do
__extension__ throw 1;
__extension__ throw 1; // expected-error {{expected expression}}
(void)throw; // expected-error {{expected expression}}
}