summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-06-07 18:32:55 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-06-07 18:32:55 +0000
commit4614524d4a67c98d12e9dcfed00d6fb75f2e6b08 (patch)
treeb4526c0392b6849a572dd7fb2cde3559f75c614b /clang/lib
parentebe0be9ca46f4c856d42b86354073e492c1eeda8 (diff)
downloadbcm5719-llvm-4614524d4a67c98d12e9dcfed00d6fb75f2e6b08.tar.gz
bcm5719-llvm-4614524d4a67c98d12e9dcfed00d6fb75f2e6b08.zip
Objective-C: Removes a bogus warning about auto-synthesis
of properties. Fixes // rdar://14085456 llvm-svn: 183542
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 7770bbde628..7f555857c84 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -1673,16 +1673,6 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl,
if (Prop->isInvalidDecl() ||
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional)
continue;
- if (ObjCPropertyImplDecl *PID =
- IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {
- if (PID->getPropertyDecl() != Prop) {
- Diag(Prop->getLocation(), diag::warn_no_autosynthesis_shared_ivar_property)
- << Prop->getIdentifier()->getName();
- if (!PID->getLocation().isInvalid())
- Diag(PID->getLocation(), diag::note_property_synthesize);
- }
- continue;
- }
// Property may have been synthesized by user.
if (IMPDecl->FindPropertyImplDecl(Prop->getIdentifier()))
continue;
@@ -1692,6 +1682,16 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl,
if (IMPDecl->getInstanceMethod(Prop->getSetterName()))
continue;
}
+ if (ObjCPropertyImplDecl *PID =
+ IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) {
+ if (PID->getPropertyDecl() != Prop) {
+ Diag(Prop->getLocation(), diag::warn_no_autosynthesis_shared_ivar_property)
+ << Prop->getIdentifier()->getName();
+ if (!PID->getLocation().isInvalid())
+ Diag(PID->getLocation(), diag::note_property_synthesize);
+ }
+ continue;
+ }
if (isa<ObjCProtocolDecl>(Prop->getDeclContext())) {
// We won't auto-synthesize properties declared in protocols.
Diag(IMPDecl->getLocation(),
OpenPOWER on IntegriCloud