aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-05-08 21:41:25 +0000
committerJohn McCall <rjmccall@apple.com>2012-05-08 21:41:25 +0000
commitd1376ee0945a4eba0590ae33d14bade860b08a7d (patch)
tree3003f45944d4c35838268703259947b5c98f0f2f /lib/Sema
parent6a2a1865f8bfaedff312b043f1e875a43e95b259 (diff)
Bind cleanups after doing l2r conversion on the operand of a
@throw expression; l2r conversion can introduce new cleanups in certain cases, like when the expression is an ObjC property reference of retainable type in ARC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 77cc642b5e..2e1cc7c600 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -2677,15 +2677,13 @@ Sema::ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try,
Finally));
}
-StmtResult Sema::BuildObjCAtThrowStmt(SourceLocation AtLoc,
- Expr *Throw) {
+StmtResult Sema::BuildObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw) {
if (Throw) {
- Throw = MaybeCreateExprWithCleanups(Throw);
ExprResult Result = DefaultLvalueConversion(Throw);
if (Result.isInvalid())
return StmtError();
- Throw = Result.take();
+ Throw = MaybeCreateExprWithCleanups(Result.take());
QualType ThrowType = Throw->getType();
// Make sure the expression type is an ObjC pointer or "void *".
if (!ThrowType->isDependentType() &&