[SourceKit] Report synthesized protocol conformances for DocSupport request. rdar://36882292 (#14248)

This commit is contained in:
Xi Ge
2018-01-30 13:32:50 -08:00
committed by GitHub
parent b1092f86f3
commit 98570550c3
4 changed files with 103 additions and 45 deletions

View File

@@ -549,7 +549,9 @@ static void reportRelated(ASTContext &Ctx,
// Otherwise, report the inheritance of the type alias itself.
passInheritsAndConformancesForValueDecl(TAD, Consumer);
} else if (const auto *TD = dyn_cast<TypeDecl>(D)) {
passInherits(TD->getInherited(), Consumer);
llvm::SmallVector<TypeLoc, 4> AllInherits;
getInheritedForPrinting(TD, [](const Decl* d) { return true; }, AllInherits);
passInherits(AllInherits, Consumer);
passConforms(TD->getSatisfiedProtocolRequirements(/*Sorted=*/true),
Consumer);
} else if (auto *VD = dyn_cast<ValueDecl>(D)) {