r210795 - Objective-C. Use isObjCRetainableType in my last
Fariborz Jahanian
fjahanian at apple.com
Thu Jun 12 09:12:31 PDT 2014
Author: fjahanian
Date: Thu Jun 12 11:12:30 2014
New Revision: 210795
URL: http://llvm.org/viewvc/llvm-project?rev=210795&view=rev
Log:
Objective-C. Use isObjCRetainableType in my last
patch. NFC.
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=210795&r1=210794&r2=210795&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu Jun 12 11:12:30 2014
@@ -3348,11 +3348,9 @@ static void handleTypeTagForDatatypeAttr
// 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(
switch (Attr.getKind()) {
default: llvm_unreachable("invalid ownership attribute");
case AttributeList::AT_NSReturnsRetained:
- typeOK = isValidSubjectOfNSReturnsRetainedAttribute(S, returnType);
+ typeOK = isValidSubjectOfNSReturnsRetainedAttribute(returnType);
cf = false;
break;
More information about the cfe-commits
mailing list