mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[CodeCompletion] Provide known module source file information
* 'CodeCompletionContext' now has 'requiresSourceFileInfo()' flag * When 'true', 'SourceFiles' is populated. * 'SourceFiles' is a list of pairs of a known module source file path and its up-to-date-ness * Clients (i.e. 'CodeCompletionConsumer') can retrieve it from 'CodeCompletionContext' in 'handleResults' * Each completion item now has 'SourceFilePath' property * C-APIs to get those informations
This commit is contained in:
@@ -1169,9 +1169,10 @@ Completion *CompletionBuilder::finish() {
|
||||
base = SwiftResult(
|
||||
semanticContext, flair, current.getNumBytesToErase(), completionString,
|
||||
current.getAssociatedDeclKind(), current.isSystem(),
|
||||
current.getModuleName(), current.getNotRecommendedReason(),
|
||||
current.getBriefDocComment(), current.getAssociatedUSRs(),
|
||||
current.getDeclKeywords(), typeRelation, opKind);
|
||||
current.getModuleName(), current.getSourceFilePath(),
|
||||
current.getNotRecommendedReason(), current.getBriefDocComment(),
|
||||
current.getAssociatedUSRs(), current.getDeclKeywords(), typeRelation,
|
||||
opKind);
|
||||
} else {
|
||||
base = SwiftResult(current.getKind(), semanticContext, flair,
|
||||
current.getNumBytesToErase(), completionString,
|
||||
|
||||
Reference in New Issue
Block a user