diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 03:01:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-10 03:01:36 +0000 |
commit | 1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 (patch) | |
tree | ef613876a2162db4f5bc717ca55e4f07646310c0 /lib/Parse | |
parent | fd6ad3cf9c8fc6904bd5f33212207aa69743fd45 (diff) |
Revert r78535, it is causing a number of failures to build projects.
--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 31 | ||||
-rw-r--r-- | lib/Parse/ParseExprCXX.cpp | 5 |
2 files changed, 10 insertions, 26 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 6e7deef95d..62bd9ae73c 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -407,13 +407,11 @@ Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, unsigned MinPrec) { /// due to member pointers. /// Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression, - bool isAddressOfOperand, - bool parseParenAsExprList){ + bool isAddressOfOperand) { bool NotCastExpr; OwningExprResult Res = ParseCastExpression(isUnaryExpression, isAddressOfOperand, - NotCastExpr, - parseParenAsExprList); + NotCastExpr); if (NotCastExpr) Diag(Tok, diag::err_expected_expression); return move(Res); @@ -532,8 +530,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression, /// Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression, bool isAddressOfOperand, - bool &NotCastExpr, - bool parseParenAsExprList){ + bool &NotCastExpr) { OwningExprResult Res(Actions); tok::TokenKind SavedKind = Tok.getKind(); NotCastExpr = false; @@ -558,7 +555,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression, SourceLocation LParenLoc = Tok.getLocation(); SourceLocation RParenLoc; Res = ParseParenExpression(ParenExprType, false/*stopIfCastExr*/, - parseParenAsExprList, CastTy, RParenLoc); + CastTy, RParenLoc); if (Res.isInvalid()) return move(Res); switch (ParenExprType) { @@ -1024,7 +1021,7 @@ Parser::ParseExprAfterTypeofSizeofAlignof(const Token &OpTok, // operands. EnterExpressionEvaluationContext Unevaluated(Actions, Action::Unevaluated); - Operand = ParseParenExpression(ExprType, true/*stopIfCastExpr*/, false, + Operand = ParseParenExpression(ExprType, true/*stopIfCastExpr*/, CastTy, RParenLoc); CastRange = SourceRange(LParenLoc, RParenLoc); @@ -1281,8 +1278,7 @@ Parser::OwningExprResult Parser::ParseBuiltinPrimaryExpression() { /// Parser::OwningExprResult Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, - bool parseAsExprList, TypeTy *&CastTy, - SourceLocation &RParenLoc) { + TypeTy *&CastTy, SourceLocation &RParenLoc) { assert(Tok.is(tok::l_paren) && "Not a paren expr!"); GreaterThanIsOperatorScope G(GreaterThanIsOperator, true); SourceLocation OpenLoc = ConsumeParen(); @@ -1342,25 +1338,14 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, // Parse the cast-expression that follows it next. // TODO: For cast expression with CastTy. - Result = ParseCastExpression(false, false, true); + Result = ParseCastExpression(false); if (!Result.isInvalid()) - Result = Actions.ActOnCastExpr(CurScope, OpenLoc, CastTy, RParenLoc, - move(Result)); + Result = Actions.ActOnCastExpr(OpenLoc, CastTy, RParenLoc,move(Result)); return move(Result); } Diag(Tok, diag::err_expected_lbrace_in_compound_literal); return ExprError(); - } else if (parseAsExprList) { - // Parse the expression-list. - ExprVector ArgExprs(Actions); - CommaLocsTy CommaLocs; - - if (!ParseExpressionList(ArgExprs, CommaLocs)) { - ExprType = SimpleExpr; - Result = Actions.ActOnParenListExpr(OpenLoc, Tok.getLocation(), - move_arg(ArgExprs)); - } } else { Result = ParseExpression(); ExprType = SimpleExpr; diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index 46526e47dd..91b4d4d5a9 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -1154,7 +1154,7 @@ Parser::ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType, // will be consumed. Result = ParseCastExpression(false/*isUnaryExpression*/, false/*isAddressofOperand*/, - NotCastExpr, false); + NotCastExpr); } // If we parsed a cast-expression, it's really a type-id, otherwise it's @@ -1196,8 +1196,7 @@ Parser::ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType, // Result is what ParseCastExpression returned earlier. if (!Result.isInvalid()) - Result = Actions.ActOnCastExpr(CurScope, LParenLoc, CastTy, RParenLoc, - move(Result)); + Result = Actions.ActOnCastExpr(LParenLoc, CastTy, RParenLoc,move(Result)); return move(Result); } |