diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-01-19 22:31:54 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-01-19 22:31:54 +0000 |
| commit | b5d49356e64608b8ee48140525734bf694c495da (patch) | |
| tree | c2e6bdb078eff322a780026ee4227293f0985979 /clang/lib/Parse/ParseExpr.cpp | |
| parent | 7eeb1cc60592d75d32ef94c63e586b5a4b18fde1 (diff) | |
| download | bcm5719-llvm-b5d49356e64608b8ee48140525734bf694c495da.tar.gz bcm5719-llvm-b5d49356e64608b8ee48140525734bf694c495da.zip | |
Convert more expression actions to smart pointers.
llvm-svn: 62537
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 08cb0dd5ce0..dc95c381d5c 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -315,12 +315,12 @@ Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, unsigned MinPrec) { // Combine the LHS and RHS into the LHS (e.g. build AST). if (TernaryMiddle.isInvalid()) LHS = Actions.ActOnBinOp(CurScope, OpToken.getLocation(), - OpToken.getKind(), LHS.release(), - RHS.release()); + OpToken.getKind(), move_arg(LHS), + move_arg(RHS)); else LHS = Actions.ActOnConditionalOp(OpToken.getLocation(), ColonLoc, - LHS.release(), TernaryMiddle.release(), - RHS.release()); + move_arg(LHS), move_arg(TernaryMiddle), + move_arg(RHS)); } } } @@ -472,7 +472,7 @@ Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression) { Res = ParseCastExpression(false); if (!Res.isInvalid()) Res = Actions.ActOnCastExpr(LParenLoc, CastTy, RParenLoc, - Res.release()); + move_arg(Res)); return move(Res); } @@ -1097,11 +1097,11 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, Result = ParseInitializer(); ExprType = CompoundLiteral; if (!Result.isInvalid()) - return Owned(Actions.ActOnCompoundLiteral(OpenLoc, Ty, RParenLoc, - Result.release())); + return Actions.ActOnCompoundLiteral(OpenLoc, Ty, RParenLoc, + move_arg(Result)); return move(Result); } - + if (ExprType == CastExpr) { // Note that this doesn't parse the subsequence cast-expression, it just // returns the parsed type to the callee. @@ -1109,7 +1109,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, CastTy = Ty; return OwningExprResult(Actions); } - + Diag(Tok, diag::err_expected_lbrace_in_compound_literal); return ExprError(); } else { |

