[CodeCompletion] Explain why results aren't recommended

* Implement 'getDiagnosticSeverity()' and 'getDiagnosticMessage()' on
  'CodeCompletionResult'
* Differentiate 'RedundantImportIndirect' from 'RedundantImport'
* Make non-Sendable check respects '-warn-concurrency'

rdar://76129658
This commit is contained in:
Rintaro Ishizaki
2021-05-13 13:55:30 -07:00
parent f8751d466e
commit ed1db1bed2
18 changed files with 528 additions and 59 deletions

View File

@@ -1170,9 +1170,10 @@ Completion *CompletionBuilder::finish() {
semanticContext, flair, current.getNumBytesToErase(), completionString,
current.getAssociatedDeclKind(), current.isSystem(),
current.getModuleName(), current.getSourceFilePath(),
current.getNotRecommendedReason(), current.getBriefDocComment(),
current.getAssociatedUSRs(), current.getDeclKeywords(), typeRelation,
opKind);
current.getNotRecommendedReason(), current.getDiagnosticSeverity(),
current.getDiagnosticMessage(), current.getBriefDocComment(),
current.getAssociatedUSRs(), current.getDeclKeywords(),
typeRelation, opKind);
} else {
base = SwiftResult(current.getKind(), semanticContext, flair,
current.getNumBytesToErase(), completionString,