Skip to content

Commit 52239f5

Browse files
committed
APIDigester: Use getAllInheritedProtocols()
1 parent a801ac3 commit 52239f5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/APIDigester/ModuleAnalyzerNodes.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,16 +1959,14 @@ void swift::ide::api::
19591959
SwiftDeclCollector::addConformancesToTypeDecl(SDKNodeDeclType *Root,
19601960
NominalTypeDecl *NTD) {
19611961
if (auto *PD = dyn_cast<ProtocolDecl>(NTD)) {
1962-
PD->walkInheritedProtocols([&](ProtocolDecl *inherited) {
1963-
if (PD != inherited && !Ctx.shouldIgnore(inherited)) {
1962+
for (auto *inherited : PD->getAllInheritedProtocols()) {
1963+
if (!Ctx.shouldIgnore(inherited)) {
19641964
ProtocolConformanceRef Conf(inherited);
19651965
auto ConfNode = SDKNodeInitInfo(Ctx, Conf)
19661966
.createSDKNode(SDKNodeKind::Conformance);
19671967
Root->addConformance(ConfNode);
19681968
}
1969-
1970-
return TypeWalker::Action::Continue;
1971-
});
1969+
}
19721970
} else {
19731971
// Avoid adding the same conformance twice.
19741972
SmallPtrSet<ProtocolConformance*, 4> Seen;

0 commit comments

Comments
 (0)