summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-07-14 18:11:52 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-07-14 18:11:52 +0000
commit56a9d54de8fdb7901c75c8fce2cecee201c41bcb (patch)
tree9779c0964d78391faa910459f4bc97e1f48b797d /clang/lib/Sema/SemaObjCProperty.cpp
parent75fbb3b5e5b28be3692f2236b0100467d10a43ef (diff)
downloadbcm5719-llvm-56a9d54de8fdb7901c75c8fce2cecee201c41bcb.tar.gz
bcm5719-llvm-56a9d54de8fdb7901c75c8fce2cecee201c41bcb.zip
Don't error when doing default property synthesis
and some are already synthesized by user declaration. llvm-svn: 108341
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index b2b6e13717e..ff60599b851 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud