I want clangd to support WSL paths, but it uses is_absolute from /llvm/Support/Path to check the paths. Should I find a different way to check the paths or update Path to support WSL paths?
Given that Path is largely an LLVM implementation of std::filesystem::path, and std::filesystem::path has an is_absolute method (see https://en.cppreference.com/w/cpp/filesystem/path/is_absrel), we should mirror what std::filesystem::path does unless there’s a very compelling reason to do something different.
However, changing the scattered program logic to accommodate WSL paths does not seem to be a good approach. Modifying my local code for my own use should be the best approach.
Can you describe in more detail what you’re trying to do and what doesn’t work?
A path starting with \\wsl.localhost\distroname is a normal Windows UNC network-share path, just like \\myserver\sharename. It should be already detected as an absolute path (by std::filesystem::path on Windows, and llvm’s Path.h when operating in windows path mode).
Thank you for your reply. I am trying to modify the LSP client to implement path mapping instead of modifying clangd for path mapping, so this issue no longer exists for the time being.