aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-01-12 19:55:42 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-01-12 19:55:42 +0000
commitd1fa6449e9dbdd667466e9e1e971aa17c9793e8a (patch)
tree982f5ea8a4e741b2ef6a528035f4994517708b1e /lib/AST/DeclObjC.cpp
parent3ecc20f17ca87b08b476f9965ac6eb5928296604 (diff)
Patch to supprt case of readonly property being
assigned to when it has user declared setter method defined in the class implementation (but no declaration in the class itself). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index c4caed1e00..9fc0f763bb 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -251,34 +251,6 @@ void ObjCMethodDecl::setMethodParams(ParmVarDecl **NewParamInfo,
}
}
-/// isPropertyReadonly - Return true if property is readonly, by searching
-/// for the property in the class and in its categories.
-///
-bool ObjCInterfaceDecl::isPropertyReadonly(ObjCPropertyDecl *PDecl) const
-{
- // Even if property is ready only, if interface has a user defined setter,
- // it is not considered read only.
- if (!PDecl->isReadOnly() || getInstanceMethod(PDecl->getSetterName()))
- return false;
-
- // Main class has the property as 'readonly'. Must search
- // through the category list to see if the property's
- // attribute has been over-ridden to 'readwrite'.
- for (ObjCCategoryDecl *Category = getCategoryList();
- Category; Category = Category->getNextClassCategory()) {
- // Even if property is ready only, if a category has a user defined setter,
- // it is not considered read only.
- if (Category->getInstanceMethod(PDecl->getSetterName()))
- return false;
- ObjCPropertyDecl *P =
- Category->FindPropertyDeclaration(PDecl->getIdentifier());
- if (P && !P->isReadOnly())
- return false;
- }
-
- return true;
-}
-
/// FindCategoryDeclaration - Finds category declaration in the list of
/// categories for this class and returns it. Name of the category is passed
/// in 'CategoryId'. If category not found, return 0;