diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-06-12 16:12:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-06-12 16:12:30 +0000 |
commit | 18ce5b3599875fa7817ab441a8e5e5c1a4037cfa (patch) | |
tree | 4cc3950fa77f5ed6086a8a5c68a5087586f7b479 /lib/Sema/SemaDeclAttr.cpp | |
parent | 2fa12a2ac0568626af43a133e2d29cb9e540154f (diff) |
Objective-C. Use isObjCRetainableType in my last
patch. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 6db2127bd3..bd9f650851 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/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; |