[clang-tools-extra] Add clangd-index-server support for cross platform indexes (PR #207202)
Bartosz Wiklak via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 9 22:59:38 PDT 2026
================
@@ -449,6 +449,39 @@ TEST(RemoteMarshallingTest, URIToRelativePathTranslation) {
llvm::consumeError(RelativePath.takeError());
}
+TEST(RemoteMarshallingTest, CrossPlatformPathsRoundTrip) {
+ llvm::BumpPtrAllocator Arena;
+ llvm::UniqueStringSaver Strings(Arena);
+
+ // Simulate a Windows-built index
+ Marshaller ProtobufMarshaller("C:/remote/project/",
----------------
bwiklak wrote:
You're right about first point but, looking at the code, URI::createFile won't work here. On a Unix host, it uses the native path style internally, so it doesn't recognize C:\\remote\\project\\ (or even C:/remote/project/) as having a Windows root. Specifically, in uriFromAbsolutePath which this function calls.
I wanted those test to still be cross-platform.
https://github.com/llvm/llvm-project/pull/207202
More information about the cfe-commits
mailing list