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 | 79d1215d83b14d26ef7dd287eced32849a44a524 (patch) | |
tree | 766f70e11be9ecc163ca5585485716f32553bac8 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 559835f0267418da725f3ddce7338ca8d848a2cb (diff) | |
download | bcm5719-llvm-79d1215d83b14d26ef7dd287eced32849a44a524.tar.gz bcm5719-llvm-79d1215d83b14d26ef7dd287eced32849a44a524.zip |
Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.
llvm-svn: 76076
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index b8a9834b50b..8dc14eebe45 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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); |