don't emit navigator name if it's the same as subHeading

This commit is contained in:
Victoria Mitchell
2021-03-01 10:57:54 -07:00
parent 66e712b79e
commit db3685aa29
5 changed files with 6 additions and 155 deletions

View File

@@ -594,17 +594,9 @@ void
SymbolGraph::serializeNavigatorDeclarationFragments(StringRef Key,
const Symbol &S,
llvm::json::OStream &OS) {
DeclarationFragmentPrinter Printer(this, OS, Key);
if (const auto *TD = dyn_cast<GenericTypeDecl>(S.getSymbolDecl())) {
DeclarationFragmentPrinter Printer(this, OS, Key);
Printer.printAbridgedType(TD, /*PrintKeyword=*/false);
} else {
auto Options = getSubHeadingDeclarationFragmentsPrintOptions();
if (S.getBaseType()) {
Options.setBaseType(S.getBaseType());
Options.PrintAsMember = true;
}
S.getSymbolDecl()->print(Printer, Options);
}
}