diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2013-06-07 20:26:51 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-06-07 20:26:51 +0000 |
| commit | bbc126e7df843d85b963b62211c13c25b53cf476 (patch) | |
| tree | df45deeecea6fe4d1e31b5346652adc0420b13b8 /clang/lib | |
| parent | 0220e6bd852cbd1202e04162baa6330a254e4794 (diff) | |
| download | bcm5719-llvm-bbc126e7df843d85b963b62211c13c25b53cf476.tar.gz bcm5719-llvm-bbc126e7df843d85b963b62211c13c25b53cf476.zip | |
Objective-C: Another case of issuing warning about misusing
property auto-synthesis before knowingit it is to be
auto-synthesized. // rdar://14094682
llvm-svn: 183556
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 7f555857c84..84752d99bd8 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1655,6 +1655,19 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl, for (unsigned i = 0, e = PropertyOrder.size(); i != e; i++) { ObjCPropertyDecl *Prop = PropertyOrder[i]; + // Is there a matching property synthesize/dynamic? + if (Prop->isInvalidDecl() || + Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional) + continue; + // 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; + } // If property to be implemented in the super class, ignore. if (SuperPropMap[Prop->getIdentifier()]) { ObjCPropertyDecl *PropInSuperClass = SuperPropMap[Prop->getIdentifier()]; @@ -1669,19 +1682,6 @@ void Sema::DefaultSynthesizeProperties(Scope *S, ObjCImplDecl* IMPDecl, } continue; } - // Is there a matching property synthesize/dynamic? - if (Prop->isInvalidDecl() || - Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional) - continue; - // 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; - } if (ObjCPropertyImplDecl *PID = IMPDecl->FindPropertyImplIvarDecl(Prop->getIdentifier())) { if (PID->getPropertyDecl() != Prop) { |

