[all-commits] [llvm/llvm-project] 3975c3: [clangd] Fix conversion from Windows UNC paths to ...
Kirill Bobyrev via All-commits
all-commits at lists.llvm.org
Wed Jul 22 03:13:58 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3975c3be80412bb6b1376bcef53ebce53984ddd7
https://github.com/llvm/llvm-project/commit/3975c3be80412bb6b1376bcef53ebce53984ddd7
Author: Ilya Golovenko <ilya.golovenko at gmail.com>
Date: 2020-07-22 (Wed, 22 Jul 2020)
Changed paths:
M clang-tools-extra/clangd/URI.cpp
M clang-tools-extra/clangd/unittests/URITests.cpp
Log Message:
-----------
[clangd] Fix conversion from Windows UNC paths to file URI format.
Summary:
The fix improves handling of Windows UNC paths to align with Appendix E. Nonstandard Syntax Variations of RFC 8089.
Before this fix it was difficult to use Windows UNC paths in compile_commands.json database as such paths were converted to file URIs using 'file:////auth/share/file.cpp' notation instead of recommended 'file://auth/share/file.cpp'.
As an example, VS.Code cannot understand file URIs with 4 starting slashes, thus such features as go-to-definition, jump-to-file, hover tooltip, etc. stop working. This also applicable to files which reside on Windows network-mapped drives because clangd internally resolves file paths to real paths in some cases and such paths get resolved to UNC paths.
Reviewers: sammccall, kadircet
Reviewed By: sammccall
Subscribers: ormris, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, kbobyrev, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D84172
More information about the All-commits
mailing list