writable property in a category of class's superclass
makes the property writable in the current class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68446 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 299f101..80d46bc 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -835,6 +835,9 @@
ObjCImplementations[IDecl->getIdentifier()])
if (ImpDecl->getInstanceMethod(PDecl->getSetterName()))
return false;
+ // If all fails, look at the super class.
+ if (ObjCInterfaceDecl *SIDecl = IDecl->getSuperClass())
+ return isPropertyReadonly(PDecl, SIDecl);
return true;
}