[cfe-commits] r71927 - in /cfe/trunk: lib/Parse/ParseExpr.cpp test/Parser/cxx-throw.cpp
Mike Stump
mrs at apple.com
Fri May 15 21:31:35 PDT 2009
Author: mrs
Date: Fri May 15 23:31:34 2009
New Revision: 71927
URL: http://llvm.org/viewvc/llvm-project?rev=71927&view=rev
Log:
Fixup __extension__ i = 1 parsing. Thanks Eli!
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
cfe/trunk/test/Parser/cxx-throw.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=71927&r1=71926&r2=71927&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Fri May 15 23:31:34 2009
@@ -225,7 +225,7 @@
/// 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__,
Modified: cfe/trunk/test/Parser/cxx-throw.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-throw.cpp?rev=71927&r1=71926&r2=71927&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-throw.cpp (original)
+++ cfe/trunk/test/Parser/cxx-throw.cpp Fri May 15 23:31:34 2009
@@ -10,7 +10,6 @@
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}}
}
More information about the cfe-commits
mailing list