diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-14 18:11:52 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-07-14 18:11:52 +0000 |
commit | d3635b9681daaef74974932f77080910b032b9fd (patch) | |
tree | 60616801d949e2edcde30026d5d80f2722981be3 /lib/Sema/SemaObjCProperty.cpp | |
parent | 7e9ad8b4fd446ca7cc0e630edee56d8fcc4553de (diff) |
Don't error when doing default property synthesis
and some are already synthesized by user declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index b2b6e13717..ff60599b85 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -930,6 +930,10 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl, Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional || IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) continue; + // Property may have been synthesized by user. + if (IMPDecl->FindPropertyImplDecl(Prop->getIdentifier())) + continue; + ActOnPropertyImplDecl(S, IMPDecl->getLocation(), IMPDecl->getLocation(), true, DeclPtrTy::make(IMPDecl), Prop->getIdentifier(), Prop->getIdentifier()); |