aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaStmt.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index e09243372e..c2a3a3a8ca 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -1126,17 +1126,17 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprArg rex) {
// In C++ the return statement is handled via a copy initialization.
// the C version of which boils down to CheckSingleAssignmentConstraints.
- rex = PerformCopyInitialization(
- InitializedEntity::InitializeResult(ReturnLoc,
- FnRetTypeLoc),
- SourceLocation(),
- Owned(RetValExp));
- if (rex.isInvalid()) {
+ OwningExprResult Res = PerformCopyInitialization(
+ InitializedEntity::InitializeResult(ReturnLoc,
+ FnRetTypeLoc),
+ SourceLocation(),
+ Owned(RetValExp));
+ if (Res.isInvalid()) {
// FIXME: Cleanup temporaries here, anyway?
return StmtError();
}
- RetValExp = rex.takeAs<Expr>();
+ RetValExp = Res.takeAs<Expr>();
if (RetValExp)
CheckReturnStackAddr(RetValExp, FnRetType, ReturnLoc);
}