mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Introduce abstraction for extension/type decl inheritance clauses.
Wrap the `InheritedEntry` array available on both `ExtensionDecl` and `TypeDecl` in a new `InheritedTypes` class. This class will provide shared conveniences for working with inherited type clauses. NFC.
This commit is contained in:
@@ -389,7 +389,7 @@ void
|
||||
SymbolGraph::recordInheritanceRelationships(Symbol S) {
|
||||
const auto VD = S.getLocalSymbolDecl();
|
||||
if (const auto *NTD = dyn_cast<NominalTypeDecl>(VD)) {
|
||||
for (const auto &InheritanceLoc : NTD->getInherited()) {
|
||||
for (const auto &InheritanceLoc : NTD->getInherited().getEntries()) {
|
||||
auto Ty = InheritanceLoc.getType();
|
||||
if (!Ty) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user