File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -1351,9 +1351,12 @@ void swift::ide::deliverCompletionResults(
1351
1351
// Add results for all imported modules.
1352
1352
SmallVector<ImportedModule, 4 > Imports;
1353
1353
SF.getImportedModules (
1354
- Imports, {ModuleDecl::ImportFilterKind::Exported,
1355
- ModuleDecl::ImportFilterKind::Default,
1356
- ModuleDecl::ImportFilterKind::ImplementationOnly});
1354
+ Imports, {
1355
+ ModuleDecl::ImportFilterKind::Exported,
1356
+ ModuleDecl::ImportFilterKind::Default,
1357
+ ModuleDecl::ImportFilterKind::ImplementationOnly,
1358
+ ModuleDecl::ImportFilterKind::SPIAccessControl,
1359
+ });
1357
1360
1358
1361
for (auto Imported : Imports) {
1359
1362
for (auto Import : namelookup::getAllImports (Imported.importedModule ))
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t/split)
2
+ // RUN: %empty-directory(%t/build)
3
+ // RUN: %{python} %utils/split_file.py -o %t/split %s
4
+
5
+ // RUN: %target-swift-frontend -emit-module -o %t/build %t/split/pck.swift
6
+
7
+ // RUN: %target-swift-ide-test -code-completion -source-filename %t/split/test.swift -I %t/build -code-completion-token=COMPLETE | %FileCheck %s
8
+
9
+ // BEGIN pck.swift
10
+
11
+ public func apiFunc( ) { }
12
+
13
+ @_spi ( MySPI)
14
+ public func spiFunc( ) { }
15
+
16
+ // BEGIN test.swift
17
+
18
+ @_spi ( MySPI) import pck
19
+
20
+ func test( ) {
21
+ #^COMPLETE^#
22
+ }
23
+
24
+ // CHECK: Begin completions
25
+ // CHECK-DAG: Decl[FreeFunction]/OtherModule[pck]: apiFunc()[#Void#]; name=apiFunc()
26
+ // CHECK-DAG: Decl[FreeFunction]/OtherModule[pck]: spiFunc()[#Void#]; name=spiFunc()
27
+ // CHECK: End completions
You can’t perform that action at this time.
0 commit comments