return T;
ResultType = Context.getBlockPointerType(ResultType);
+ } else if (const MemberPointerType *MemberPointer
+ = T->getAs<MemberPointerType>()) {
+ QualType Pointee = MemberPointer->getPointeeType();
+ ResultType = getExtFunctionType(Context, Pointee, Info);
+ if (ResultType == Pointee)
+ return T;
+
+ ResultType = Context.getMemberPointerType(ResultType,
+ MemberPointer->getClass());
} else if (const FunctionType *F = T->getAs<FunctionType>()) {
if (F->getExtInfo() == Info)
return T;
// Delay if this is not a function or pointer to block.
if (!Type->isFunctionPointerType()
&& !Type->isBlockPointerType()
- && !Type->isFunctionType())
+ && !Type->isFunctionType()
+ && !Type->isMemberFunctionPointerType())
return true;
if (!GetResultType(Type)->isVoidType()) {
// Delay if this is not a function or pointer to block.
if (!Type->isFunctionPointerType()
&& !Type->isBlockPointerType()
- && !Type->isFunctionType())
+ && !Type->isFunctionType()
+ && !Type->isMemberFunctionPointerType())
return true;
// Otherwise we can process right away.
QualType T = Type;
if (const PointerType *PT = Type->getAs<PointerType>())
T = PT->getPointeeType();
+ else if (const BlockPointerType *BPT = Type->getAs<BlockPointerType>())
+ T = BPT->getPointeeType();
+ else if (const MemberPointerType *MPT = Type->getAs<MemberPointerType>())
+ T = MPT->getPointeeType();
+ else if (const ReferenceType *RT = Type->getAs<ReferenceType>())
+ T = RT->getPointeeType();
const FunctionType *Fn = T->getAs<FunctionType>();
// Delay if the type didn't work out to a function.