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
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index d477446..2903f99 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -3833,6 +3833,7 @@
Exp = new UnaryOperator(Exp, UnaryOperator::AddrOf,
Context->getPointerType(Exp->getType()),
SourceLocation());
+ InitExprs.push_back(Exp);
}
}
NewRep = new CallExpr(DRE, &InitExprs[0], InitExprs.size(),