diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index f42daced863..1cb84e44806 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -868,6 +868,13 @@ static bool hasWrittenStorageAttribute(ObjCPropertyDecl *Prop) { return OrigProp->getPropertyAttributesAsWritten() & OwnershipMask; } + // Look through all of the protocols. + for (const auto *Proto : OrigClass->all_referenced_protocols()) { + if (ObjCPropertyDecl *OrigProp = + Proto->FindPropertyDeclaration(Prop->getIdentifier())) + return OrigProp->getPropertyAttributesAsWritten() & OwnershipMask; + } + return false; } |