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