[CodeCompletion] Add 'IsSystem' flag to code completion result item

'key.is_system: 1' is added if the associated declaration is from a
system module.

rdar://problem/62617558
This commit is contained in:
Rintaro Ishizaki
2020-05-07 17:25:11 -07:00
parent d613cd9218
commit 75a0c9f819
49 changed files with 446 additions and 364 deletions

View File

@@ -1315,10 +1315,11 @@ Completion *CompletionBuilder::finish() {
if (current.getKind() == SwiftResult::Declaration) {
base = SwiftResult(
semanticContext, current.getNumBytesToErase(), completionString,
current.getAssociatedDeclKind(), current.getModuleName(),
current.isNotRecommended(), current.getNotRecommendedReason(),
current.getBriefDocComment(), current.getAssociatedUSRs(),
current.getDeclKeywords(), typeRelation, opKind);
current.getAssociatedDeclKind(), current.isSystem(),
current.getModuleName(), current.isNotRecommended(),
current.getNotRecommendedReason(), current.getBriefDocComment(),
current.getAssociatedUSRs(), current.getDeclKeywords(),
typeRelation, opKind);
} else {
base = SwiftResult(current.getKind(), semanticContext,
current.getNumBytesToErase(), completionString,