forked from OSchip/llvm-project
Fixup __extension__ i = 1 parsing. Thanks Eli!
llvm-svn: 71927
This commit is contained in:
parent
83d008614f
commit
b9075ae9f7
|
@ -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__,
|
||||
|
|
|
@ -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}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue