[SourceKit] Similar with what we do for module printing, for quick help, elevate the doc-comment from conformances if the decl itself does not have associated doc-comment. rdar://24409720

This commit is contained in:
Xi Ge
2016-03-21 15:04:55 -07:00
parent 66fb8062fe
commit 2c75cfba39
2 changed files with 35 additions and 0 deletions

View File

@@ -632,6 +632,15 @@ static bool passCursorInfoForDecl(const ValueDecl *VD,
}
unsigned DocCommentEnd = SS.size();
if (DocCommentEnd == DocCommentBegin) {
if (auto *Req = ASTPrinter::findConformancesWithDocComment(
const_cast<ValueDecl*>(VD))) {
llvm::raw_svector_ostream OS(SS);
ide::getDocumentationCommentAsXML(Req, OS);
}
DocCommentEnd = SS.size();
}
unsigned DeclBegin = SS.size();
{
llvm::raw_svector_ostream OS(SS);