Skip to content

Commit 8702101

Browse files
committed
Frontend: Use getAllInheritedProtocols()
1 parent 52239f5 commit 8702101

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Frontend/ModuleInterfaceSupport.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,9 @@ class InheritedProtocolCollector {
669669

670670
// First record all protocols that have already been handled.
671671
for (ProtocolDecl *proto : IncludedProtocols) {
672-
proto->walkInheritedProtocols(
673-
[&handledProtocols](ProtocolDecl *inherited) -> TypeWalker::Action {
674-
handledProtocols.insert(inherited);
675-
return TypeWalker::Action::Continue;
676-
});
672+
handledProtocols.insert(proto);
673+
auto allInherited = proto->getAllInheritedProtocols();
674+
handledProtocols.insert(allInherited.begin(), allInherited.end());
677675
}
678676

679677
// Preserve the behavior of previous implementations which formatted of

0 commit comments

Comments
 (0)