From bd8f371fec3d69e5fd8e173e1bf4020225dd47d9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 18 Dec 2009 17:31:58 +0000 Subject: [PATCH] Try to de-bork DISABLE_SMART_POINTERS build git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91696 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaStmt.cpp | 14 +++++++------- 1 file 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(); + RetValExp = Res.takeAs(); if (RetValExp) CheckReturnStackAddr(RetValExp, FnRetType, ReturnLoc); } -- 2.40.0