[clangd][remote] Add Windows paths support
authorAleksandr Platonov <platonov.aleksandr@huawei.com>
Tue, 20 Oct 2020 10:03:28 +0000 (13:03 +0300)
committerAleksandr Platonov <platonov.aleksandr@huawei.com>
Tue, 20 Oct 2020 10:04:20 +0000 (13:04 +0300)
commitd99b2a976a37f5a63117086d464df40c124f5777
tree08a4888d934a2705972b65f0a6537d9c853c1c1f
parentfbfb1c790982277eaa5134c2b6aa001e97fe828d
[clangd][remote] Add Windows paths support

Without this patch 6 marshalling tests fail on Windows.
This patch contains the following changes:
- Allow paths with Windows slashes (convert to the POSIX style instead of assertion)
- Add support for URI with Windows path.
- Change the value of the second parameter of several `llvm::sys::path::convert_to_slash()` calls: we should use `windows` instead of `posix` to ensure UNIX slashes in the path.
- Port `RemoteMarshallingTest::IncludeHeaderURI` test to Windows.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D89529
clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp