Skip to content

Commit b668f99

Browse files
committed
SourceKitLSP: normalise paths for clangd
Ensure that we use the native path representation for clangd rather than the POSIX spelling. This is required to map the command for the source file.
1 parent cf91181 commit b668f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SourceKitLSP/Clang/ClangLanguageServer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ extension ClangLanguageServerShim {
420420
if let compileCommand = clangBuildSettings?.compileCommand {
421421
let note = DidChangeConfigurationNotification(settings: .clangd(
422422
ClangWorkspaceSettings(
423-
compilationDatabaseChanges: [url.path: compileCommand])))
423+
compilationDatabaseChanges: [AbsolutePath(url.path).pathString: compileCommand])))
424424
forwardNotificationToClangdOnQueue(note)
425425
}
426426
}

0 commit comments

Comments
 (0)