diff options
author | Mike Stump <mrs@apple.com> | 2009-05-15 21:47:08 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-05-15 21:47:08 +0000 |
commit | 6ce0c3981eb2f6000e440f7ea9ad8bb0cd148d0a (patch) | |
tree | 05c91c06ca9a31476807db855aa9267f316fc3fa /lib/Parse/ParseExpr.cpp | |
parent | 4a2e2041edc63db687677325e113b39b9d123c40 (diff) |
Fixup parsing for (throw,throw) and __extension__ throw 1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index bfbac3ac26..c3a38b1fe2 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -201,10 +201,7 @@ static prec::Level getBinOpPrecedence(tok::TokenKind Kind, /// expression ',' assignment-expression /// Parser::OwningExprResult Parser::ParseExpression() { - if (Tok.is(tok::kw_throw)) - return ParseThrowExpression(); - - OwningExprResult LHS(ParseCastExpression(false)); + OwningExprResult LHS(ParseAssignmentExpression()); if (LHS.isInvalid()) return move(LHS); return ParseRHSOfBinaryExpression(move(LHS), prec::Comma); @@ -228,11 +225,7 @@ Parser::ParseExpressionWithLeadingAt(SourceLocation AtLoc) { /// process of disambiguating between an expression and a declaration. Parser::OwningExprResult Parser::ParseExpressionWithLeadingExtension(SourceLocation ExtLoc) { - // FIXME: The handling for throw is almost certainly wrong. - if (Tok.is(tok::kw_throw)) - return ParseThrowExpression(); - - OwningExprResult LHS(ParseCastExpression(false)); + OwningExprResult LHS(ParseAssignmentExpression()); if (LHS.isInvalid()) return move(LHS); LHS = Actions.ActOnUnaryOp(CurScope, ExtLoc, tok::kw___extension__, |