aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-11-14 21:36:12 +0000
committerSteve Naroff <snaroff@apple.com>2008-11-14 21:36:12 +0000
commit707b0fe2efd35003770fcbae2463ab915077243b (patch)
tree17b9f85b8c55bd9ffdf4c1c71c0a83f65956d533
parent06529aeadf03c2a2231a4c7221c422e3650a2a71 (diff)
Fix <rdar://problem/6372970> clang ObjC rewriter: incorrect cast when passing block argument
SynthBlockInitExpr() was not adding by-ref arguments to the init expr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59322 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Driver/RewriteObjC.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index d4774467df..2903f998a0 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -3833,6 +3833,7 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp) {
Exp = new UnaryOperator(Exp, UnaryOperator::AddrOf,
Context->getPointerType(Exp->getType()),
SourceLocation());
+ InitExprs.push_back(Exp);
}
}
NewRep = new CallExpr(DRE, &InitExprs[0], InitExprs.size(),