/// pointers types that are not compatible.
IncompatibleBlockPointer,
- /// BlockVoidPointer - The assignment is between a block pointer and
- /// void*, we accept for now.
- BlockVoidPointer,
-
/// IncompatibleObjCQualifiedId - The assignment is between a qualified
/// id type and something else (that is incompatible with it). For example,
/// "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.
if (rhsType->getAsBlockPointerType()) {
if (lhsType->getAsPointerType()->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
// Treat block pointers as objects.
if (getLangOptions().ObjC1 &&
if (const PointerType *RHSPT = rhsType->getAsPointerType()) {
if (RHSPT->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
}
return Incompatible;
}
if (isa<BlockPointerType>(lhsType) &&
rhsType->getAsPointerType()->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
return Incompatible;
}
case IncompatibleBlockPointer:
DiagKind = diag::ext_typecheck_convert_incompatible_block_pointer;
break;
- case BlockVoidPointer:
- DiagKind = diag::ext_typecheck_convert_pointer_void_block;
- break;
case IncompatibleObjCQualifiedId:
// FIXME: Diagnose the problem in ObjCQualifiedIdTypesAreCompatible, since
// it can give a more specific diagnostic.