SourceKit: Use getNextDepth()/getMaxDepth()

This commit is contained in:
Slava Pestov
2024-05-01 12:04:27 -04:00
parent 33071e2525
commit 3b2a6d8c1a
2 changed files with 2 additions and 5 deletions

View File

@@ -286,10 +286,7 @@ static void initDocGenericParams(const Decl *D, DocEntityInfo &Info,
DC = D->getInnermostDeclContext()->getInnermostTypeContext();
M = DC->getParentModule();
SubMap = BaseType->getContextSubstitutionMap(M, DC);
if (!SubMap.empty()) {
TypeContextDepth = SubMap.getGenericSignature()
.getGenericParams().back()->getDepth() + 1;
}
TypeContextDepth = SubMap.getGenericSignature().getNextDepth();
}
}