From: Steve Naroff Date: Fri, 14 Nov 2008 21:36:12 +0000 (+0000) Subject: Fix clang ObjC rewriter: incorrect cast when passing block... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=707b0fe2efd35003770fcbae2463ab915077243b;p=clang Fix 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 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(),