File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1589,8 +1589,22 @@ bool IndexSwiftASTWalker::report(ValueDecl *D) {
1589
1589
return false ;
1590
1590
}
1591
1591
} else if (auto NTD = dyn_cast<NominalTypeDecl>(D)) {
1592
- if (!reportInheritedTypeRefs (NTD->getInherited (), NTD))
1593
- return false ;
1592
+ auto *PD = dyn_cast<ProtocolDecl>(D);
1593
+ if (PD && PD->wasDeserialized ()) {
1594
+ // Deserialized protocols don't have an inheritance clause.
1595
+ for (auto *inherited : PD->getInheritedProtocols ()) {
1596
+ // FIXME(noncopyable_generics): Do we want to include these?
1597
+ if (inherited->getInvertibleProtocolKind ())
1598
+ continue ;
1599
+
1600
+ if (!reportRelatedRef (inherited, SourceLoc (), /* isImplicit=*/ false ,
1601
+ (SymbolRoleSet) SymbolRole::RelationBaseOf, PD))
1602
+ return false ;
1603
+ }
1604
+ } else {
1605
+ if (!reportInheritedTypeRefs (NTD->getInherited (), NTD))
1606
+ return false ;
1607
+ }
1594
1608
}
1595
1609
} else {
1596
1610
// Even if we don't record a local property we still need to walk its
You can’t perform that action at this time.
0 commit comments