Make sure internally synthesized block pointer types are converted before pretty printing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58380 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 27e5459..4eba8cc 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -2180,6 +2180,11 @@
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()