// Checker-specific attribute handlers.
//===----------------------------------------------------------------------===//
-static bool isValidSubjectOfNSReturnsRetainedAttribute(Sema &S, QualType type) {
+static bool isValidSubjectOfNSReturnsRetainedAttribute(QualType type) {
return type->isDependentType() ||
- type->isObjCObjectPointerType() ||
- type->isBlockPointerType() ||
- S.Context.isObjCNSObjectType(type);
+ type->isObjCRetainableType();
}
static bool isValidSubjectOfNSAttribute(Sema &S, QualType type) {
switch (Attr.getKind()) {
default: llvm_unreachable("invalid ownership attribute");
case AttributeList::AT_NSReturnsRetained:
- typeOK = isValidSubjectOfNSReturnsRetainedAttribute(S, returnType);
+ typeOK = isValidSubjectOfNSReturnsRetainedAttribute(returnType);
cf = false;
break;