diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-25 00:31:58 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-08-25 00:31:58 +0000 |
| commit | 54d75f692569124dc7fcfe7c393a7ccc686e4225 (patch) | |
| tree | 5e6d245adddf14a4a867d275c2dbee657f8364cf /clang/lib | |
| parent | 356e3e0c6a9b0749a7b7dd112a2848503e0ff01c (diff) | |
| download | bcm5719-llvm-54d75f692569124dc7fcfe7c393a7ccc686e4225.tar.gz bcm5719-llvm-54d75f692569124dc7fcfe7c393a7ccc686e4225.zip | |
No need to default synthesize property if implementation
has its own getter and setter methods declared.
Fixed 8349319 (nonfragile-abi2).
llvm-svn: 112003
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 91f47ab7082..b9fd4a05d7a 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/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, |

