[cfe-commits] r59322 - /cfe/trunk/Driver/RewriteObjC.cpp

Steve Naroff snaroff at apple.com
Fri Nov 14 13:36:12 PST 2008


Author: snaroff
Date: Fri Nov 14 15:36:12 2008
New Revision: 59322

URL: http://llvm.org/viewvc/llvm-project?rev=59322&view=rev
Log:
Fix <rdar://problem/6372970> clang ObjC rewriter: incorrect cast when passing block argument

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

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=59322&r1=59321&r2=59322&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Fri Nov 14 15:36:12 2008
@@ -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(),





More information about the cfe-commits mailing list