diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2020-01-04 08:32:49 -0800 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2020-01-06 16:16:02 -0800 |
commit | 20f005d25f488fa1dc69d6792700e014c6a5d165 (patch) | |
tree | efe1419ea8d1016dbd232c7d6215ac837c72f398 /clang/lib/CodeGen | |
parent | 7ba4595c86be88bf9ebb7261ba49ed4626e5f585 (diff) | |
download | bcm5719-llvm-20f005d25f488fa1dc69d6792700e014c6a5d165.tar.gz bcm5719-llvm-20f005d25f488fa1dc69d6792700e014c6a5d165.zip |
[CodeGen][ObjC] Push the properties of a protocol before pushing the
properties of the protocol it inherits
This fixes a bug where the type string for a @dynamic property of an
@implementation didn't have 'D' in it when the protocol it conforms to
redeclares the property declared in the base protocol.
rdar://problem/45503561
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index e18105fe019..f36c28a85a6 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -3245,9 +3245,6 @@ PushProtocolProperties(llvm::SmallPtrSet<const IdentifierInfo*,16> &PropertySet, SmallVectorImpl<const ObjCPropertyDecl *> &Properties, const ObjCProtocolDecl *Proto, bool IsClassProperty) { - for (const auto *P : Proto->protocols()) - PushProtocolProperties(PropertySet, Properties, P, IsClassProperty); - for (const auto *PD : Proto->properties()) { if (IsClassProperty != PD->isClassProperty()) continue; @@ -3255,6 +3252,9 @@ PushProtocolProperties(llvm::SmallPtrSet<const IdentifierInfo*,16> &PropertySet, continue; Properties.push_back(PD); } + + for (const auto *P : Proto->protocols()) + PushProtocolProperties(PropertySet, Properties, P, IsClassProperty); } /* |