aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-08-25 00:31:58 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-08-25 00:31:58 +0000
commit95f1b86b73a9a203311adc7646f2fa9ee5cdd2b7 (patch)
tree5f56fda1564af08ae7735b51a1b47e2113e79d3c /lib/Sema/SemaObjCProperty.cpp
parent0554e0e30d24d9ad7d5e12f8e7583ebb5c9715bf (diff)
No need to default synthesize property if implementation
has its own getter and setter methods declared. Fixed 8349319 (nonfragile-abi2). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 91f47ab708..b9fd4a05d7 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -953,6 +953,12 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl,
// Property may have been synthesized by user.
if (IMPDecl->FindPropertyImplDecl(Prop->getIdentifier()))
continue;
+ if (IMPDecl->getInstanceMethod(Prop->getGetterName())) {
+ if (Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readonly)
+ continue;
+ if (IMPDecl->getInstanceMethod(Prop->getSetterName()))
+ continue;
+ }
ActOnPropertyImplDecl(S, IMPDecl->getLocation(), IMPDecl->getLocation(),
true, IMPDecl,