Skip to content

Commit e200165

Browse files
author
Nathan Hawes
authored
Merge pull request #29702 from johnfairh/cursorinfo-module-name
[SourceKit] Fix cursorinfo key.modulename with sourceinfo
2 parents a7f113d + 0e8f4d4 commit e200165

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/SourceKit/CursorInfo/use-swift-source-info.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func bar() {
2323
// WITH: source.lang.swift.ref.function.free ({{.*}}/Foo.swift:2:13-2:16)
2424
// WITHOUT: source.lang.swift.ref.function.free ()
2525
// BOTH: foo()
26-
// BOTH: s:3Foo3fooyyF
27-
// BOTH: () -> ()
28-
// BOTH: $syycD
29-
// BOTH: Foo
26+
// BOTH-NEXT: s:3Foo3fooyyF
27+
// BOTH-NEXT: () -> ()
28+
// BOTH-NEXT: $syycD
29+
// BOTH-NEXT: Foo

tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ static bool passCursorInfoForDecl(SourceFile* SF,
915915
auto ClangMod = Importer->getClangOwningModule(ClangNode);
916916
if (ClangMod)
917917
ModuleName = ClangMod->getFullModuleName();
918-
} else if (VD->getLoc().isInvalid() && VD->getModuleContext() != MainModule) {
918+
} else if (VD->getModuleContext() != MainModule) {
919919
ModuleName = VD->getModuleContext()->getName().str();
920920
}
921921
StringRef ModuleInterfaceName;

0 commit comments

Comments
 (0)