aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-18 17:31:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-18 17:31:58 +0000
commitbd8f371fec3d69e5fd8e173e1bf4020225dd47d9 (patch)
treeb0092000374b1cde369d195419d1903284876561 /lib/Sema/SemaStmt.cpp
parent5617bc03e2e886aafe8bdcecf0fcdeab5f3868c6 (diff)
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
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-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);
}