Frontend: Use getAllInheritedProtocols()

This commit is contained in:
Slava Pestov
2024-02-23 10:05:25 -05:00
parent 52239f5ef5
commit 8702101567

View File

@@ -669,11 +669,9 @@ public:
// First record all protocols that have already been handled.
for (ProtocolDecl *proto : IncludedProtocols) {
proto->walkInheritedProtocols(
[&handledProtocols](ProtocolDecl *inherited) -> TypeWalker::Action {
handledProtocols.insert(inherited);
return TypeWalker::Action::Continue;
});
handledProtocols.insert(proto);
auto allInherited = proto->getAllInheritedProtocols();
handledProtocols.insert(allInherited.begin(), allInherited.end());
}
// Preserve the behavior of previous implementations which formatted of