Make sure internally synthesized block pointer types are converted before pretty printing.

llvm-svn: 58380
This commit is contained in:
Steve Naroff 2008-10-29 14:49:46 +00:00
parent fbb10bbec4
commit 52c65fa169
1 changed files with 5 additions and 0 deletions

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