diff options
author | Steve Naroff <snaroff@apple.com> | 2009-07-16 15:41:00 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-07-16 15:41:00 +0000 |
commit | f49545602089be5b1f744e04326b8a566f6d8773 (patch) | |
tree | c6a833eba46840cff3d65f06772865ffe525c711 /lib/Sema/SemaDeclObjC.cpp | |
parent | 95b851e55c328af4b69da7bfc1124bf258c0ffe5 (diff) |
Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index b8a9834b50..8dc14eebe4 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -25,7 +25,7 @@ bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, if (GetterMethod && GetterMethod->getResultType() != property->getType()) { AssignConvertType result = Incompatible; - if (Context.isObjCObjectPointerType(property->getType())) + if (property->getType()->isObjCObjectPointerType()) result = CheckAssignmentConstraints(GetterMethod->getResultType(), property->getType()); if (result != Compatible) { Diag(Loc, diag::warn_accessor_property_type_mismatch) @@ -1739,7 +1739,9 @@ void Sema::CheckObjCPropertyAttributes(QualType PropertyTy, // Check for copy or retain on non-object types. if ((Attributes & (ObjCDeclSpec::DQ_PR_copy | ObjCDeclSpec::DQ_PR_retain)) && - !Context.isObjCObjectPointerType(PropertyTy)) { + !PropertyTy->isObjCObjectPointerType() && + !PropertyTy->isBlockPointerType() && + !Context.isObjCNSObjectType(PropertyTy)) { Diag(Loc, diag::err_objc_property_requires_object) << (Attributes & ObjCDeclSpec::DQ_PR_copy ? "copy" : "retain"); Attributes &= ~(ObjCDeclSpec::DQ_PR_copy | ObjCDeclSpec::DQ_PR_retain); @@ -1770,7 +1772,7 @@ void Sema::CheckObjCPropertyAttributes(QualType PropertyTy, if (!(Attributes & (ObjCDeclSpec::DQ_PR_assign | ObjCDeclSpec::DQ_PR_copy | ObjCDeclSpec::DQ_PR_retain)) && !(Attributes & ObjCDeclSpec::DQ_PR_readonly) && - Context.isObjCObjectPointerType(PropertyTy)) { + PropertyTy->isObjCObjectPointerType()) { // Skip this warning in gc-only mode. if (getLangOptions().getGCMode() != LangOptions::GCOnly) Diag(Loc, diag::warn_objc_property_no_assignment_attribute); |