Skip to content

Commit a34ec19

Browse files
committed
SymbolGraph: Use getAllInheritedProtocols()
1 parent 16f97c5 commit a34ec19

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/SymbolGraphGen/SymbolGraph.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -492,14 +492,10 @@ void SymbolGraph::recordConformanceRelationships(Symbol S) {
492492
const auto D = S.getLocalSymbolDecl();
493493
if (const auto *NTD = dyn_cast<NominalTypeDecl>(D)) {
494494
if (auto *PD = dyn_cast<ProtocolDecl>(NTD)) {
495-
PD->walkInheritedProtocols([&](ProtocolDecl *inherited) {
496-
if (inherited != PD) {
497-
recordEdge(S, Symbol(this, inherited, nullptr),
498-
RelationshipKind::ConformsTo(), nullptr);
499-
}
500-
501-
return TypeWalker::Action::Continue;
502-
});
495+
for (auto *inherited : PD->getAllInheritedProtocols()) {
496+
recordEdge(S, Symbol(this, inherited, nullptr),
497+
RelationshipKind::ConformsTo(), nullptr);
498+
}
503499
} else {
504500
for (const auto *Conformance : NTD->getAllConformances()) {
505501
// Check to make sure that this conformance wasn't declared via an

0 commit comments

Comments
 (0)