Convert more expression actions to smart pointers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62537 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 08cb0dd..dc95c38 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -315,12 +315,12 @@
// 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 @@
Res = ParseCastExpression(false);
if (!Res.isInvalid())
Res = Actions.ActOnCastExpr(LParenLoc, CastTy, RParenLoc,
- Res.release());
+ move_arg(Res));
return move(Res);
}
@@ -1097,11 +1097,11 @@
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 @@
CastTy = Ty;
return OwningExprResult(Actions);
}
-
+
Diag(Tok, diag::err_expected_lbrace_in_compound_literal);
return ExprError();
} else {