swift
29183b32 - [cxx-interop] Stop at overriding FRT annotations in FRT class hiearchy

Commit
168 days ago
[cxx-interop] Stop at overriding FRT annotations in FRT class hiearchy Prior to this change, we would visit the base(s) of an annotated FRT base, even though there's no need to do so: struct Base1 { ... } SWIFT_SHARED_REFERENCE(.ref1, .rel1); struct Base2 : Base1 { ... } SWIFT_SHARED_REFERENCE(.ref2, .rel2); struct Derived : Base2 { ... }; When checking Derived, we don't need to visit Base1 because we already know Base2 is a foreign reference type, and can treat its annotation as an *overriding* annotation. Otherwise, if we visit Base1, we will see that it has different retain/release ops, and unnecessarily declare Derived to be an invalid FRT because we deem it to have ambiguous retain/release ops. rdar://178791071
Author
Committer
Parents
Loading