[CodeCompletion] Add a field NotRecommendedReason to code completion result to indicate why an item is not recommended, NFC. rdar://25415947

As implied in rdar://24818863, striking through a module name may be an overkill to suggest the module is redundant to import. We try to
fine-grain not-recommended-reason so that proper UI cue can be adopted in the future.
This commit is contained in:
Xi Ge
2016-03-30 16:15:41 -07:00
parent fc9e4938e1
commit c452f9640f
6 changed files with 53 additions and 17 deletions

View File

@@ -1159,6 +1159,7 @@ Completion *CompletionBuilder::finish() {
base = SwiftResult(semanticContext, current.getNumBytesToErase(),
completionString, current.getAssociatedDeclKind(),
current.getModuleName(), current.isNotRecommended(),
current.getNotRecommendedReason(),
current.getBriefDocComment(),
current.getAssociatedUSRs(),
current.getDeclKeywords());