mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user