[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
Fri Jul 10 01:01:52 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:

Yes, this got me thinking how this might affect index server and I did retest it on windows-build index, server running on mac and making manual grpc requests to it from windows plus testing how is VS Code with clangd extension behaving. All seems right so at least form the index server perspective just fixing the initial assert for absolute path in server + your previous fixes for marshalling do the trick.

Changing URI is a different beast though.

Btw, you're done similar trick in marshalling code forcing windows paths, I'm not sure I fully grasp the idea, can you explain?

https://github.com/llvm/llvm-project/pull/207202


More information about the cfe-commits mailing list