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:
Allan Shortlidge
2023-09-05 17:08:05 -07:00
parent 2c3c3c1933
commit 0dd8f4c492
33 changed files with 221 additions and 163 deletions

View File

@@ -8621,7 +8621,7 @@ GenericSignature ClangImporter::Implementation::buildGenericSignature(
SmallVector<Requirement, 2> requirements;
for (auto param : *genericParams) {
Type paramType = param->getDeclaredInterfaceType();
for (const auto &inherited : param->getInherited()) {
for (const auto &inherited : param->getInherited().getEntries()) {
Type inheritedType = inherited.getType();
if (inheritedType->isAnyObject()) {
requirements.push_back(