]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6372970> clang ObjC rewriter: incorrect cast when passing block...
authorSteve Naroff <snaroff@apple.com>
Fri, 14 Nov 2008 21:36:12 +0000 (21:36 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 14 Nov 2008 21:36:12 +0000 (21:36 +0000)
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

Driver/RewriteObjC.cpp

index d4774467df040ec6b0c05b994aa65667dbb67053..2903f998a05c5ad83733cf4c3aa73f3a29c9b4e1 100644 (file)
@@ -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(),