Fix <rdar://problem/6372970> clang ObjC rewriter: incorrect cast when passing block argument

SynthBlockInitExpr() was not adding by-ref arguments to the init expr.

llvm-svn: 59322
This commit is contained in:
Steve Naroff 2008-11-14 21:36:12 +00:00
parent fc419a035f
commit a610ab3283
1 changed files with 1 additions and 0 deletions

View 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(),