]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6343942> clang ObjC rewriter: crash rewriting blocks
authorSteve Naroff <snaroff@apple.com>
Thu, 13 Nov 2008 17:40:07 +0000 (17:40 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 13 Nov 2008 17:40:07 +0000 (17:40 +0000)
and <rdar://problem/6344601> clang ObjC rewriter: crash passing Block parameter?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59251 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index 6d673230fa8f5cd21abda2c5530ce87cae01080f..9fad9f51d0822b4794bf2dcf61d743951f62281f 100644 (file)
@@ -3731,7 +3731,7 @@ void RewriteObjC::CollectBlockDeclRefInfo(BlockExpr *Exp) {
     // Find any imported blocks...they will need special attention.
     for (unsigned i = 0; i < BlockDeclRefs.size(); i++)
       if (isBlockPointerType(BlockDeclRefs[i]->getType())) {
-        GetBlockCallExprs(Blocks[i]);
+        GetBlockCallExprs(BlockDeclRefs[i]);
         ImportedBlockDecls.insert(BlockDeclRefs[i]->getDecl());
       }
   }