]> granicus.if.org Git - clang/commitdiff
Make sure internally synthesized block pointer types are converted before pretty...
authorSteve Naroff <snaroff@apple.com>
Wed, 29 Oct 2008 14:49:46 +0000 (14:49 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 29 Oct 2008 14:49:46 +0000 (14:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58380 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp

index 27e5459089b7cce94894ecd9c5fb7d281ef3872b..4eba8cc816c1ee2a092e4924209ee64689edc055 100644 (file)
@@ -2180,6 +2180,11 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) {
       QualType t = mDecl->getParamDecl(i)->getType()->isObjCQualifiedIdType()
                      ? Context->getObjCIdType() 
                      : mDecl->getParamDecl(i)->getType();
+      // Make sure we convert "t (^)(...)" to "t (*)(...)".
+      if (isBlockPointerType(t)) {
+        const BlockPointerType *BPT = t->getAsBlockPointerType();
+        t = Context->getPointerType(BPT->getPointeeType());
+      }
       ArgTypes.push_back(t);
     }
     returnType = mDecl->getResultType()->isObjCQualifiedIdType()