summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 6db2127bd31..bd9f6508518 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3348,11 +3348,9 @@ static void handleTypeTagForDatatypeAttr(Sema &S, Decl *D,
// 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) {
@@ -3420,7 +3418,7 @@ static void handleNSReturnsRetainedAttr(Sema &S, Decl *D,
switch (Attr.getKind()) {
default: llvm_unreachable("invalid ownership attribute");
case AttributeList::AT_NSReturnsRetained:
- typeOK = isValidSubjectOfNSReturnsRetainedAttribute(S, returnType);
+ typeOK = isValidSubjectOfNSReturnsRetainedAttribute(returnType);
cf = false;
break;
OpenPOWER on IntegriCloud