diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 3a98f6324aed..0ad935ea64e4 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1540,12 +1540,12 @@ static bool SuperClassImplementsProperty(ObjCInterfaceDecl *IDecl, bool SuperClassImplementsSetter = false; if (Prop->getPropertyAttributes() & ObjCPropertyDecl::OBJC_PR_readonly) SuperClassImplementsSetter = true; - + while (IDecl->getSuperClass()) { ObjCInterfaceDecl *SDecl = IDecl->getSuperClass(); if (!SuperClassImplementsGetter && SDecl->getInstanceMethod(Prop->getGetterName())) SuperClassImplementsGetter = true; - + if (!SuperClassImplementsSetter && SDecl->getInstanceMethod(Prop->getSetterName())) SuperClassImplementsSetter = true; if (SuperClassImplementsGetter && SuperClassImplementsSetter) diff --git a/clang/test/SemaObjC/default-synthesize-3.m b/clang/test/SemaObjC/default-synthesize-3.m index 940654316915..c91597462d91 100644 --- a/clang/test/SemaObjC/default-synthesize-3.m +++ b/clang/test/SemaObjC/default-synthesize-3.m @@ -202,10 +202,10 @@ typedef NSObject FooObject; @protocol r16089191Protocol @property (readonly) NSURL *fileURL; -@property (copy) NSURL *file; -@property (copy) NSURL *fileSys; -@property (copy) NSURL *fileLog; -@property (copy) NSURL *fileKerl; +@property (copy) NSURL *file; +@property (copy) NSURL *fileSys; +@property (copy) NSURL *fileLog; +@property (copy) NSURL *fileKerl; @end @interface SubClass : SuperClass