[swift-ide-test] Provide option '-code-completion-comments' for swift-ide-test to print documentation comments for the completion results

This commit is contained in:
Argyrios Kyrtzidis
2018-01-12 16:09:03 -08:00
parent a70d67fab1
commit 18dfb2810a
3 changed files with 26 additions and 9 deletions

View File

@@ -5514,6 +5514,11 @@ void PrintingCodeCompletionConsumer::handleResults(
Result->getCompletionString()->getName(NameOs);
OS << "; name=" << Name;
StringRef comment = Result->getBriefDocComment();
if (IncludeComments && !comment.empty()) {
OS << "; comment=" << comment;
}
OS << "\n";
}
OS << "End completions\n";