[PATCH] D84172: [clangd] Fix conversion from Windows UNC paths to file URI format.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 10:08:55 PDT 2020
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Thanks! Do you have commit access, or should I land this for you?
================
Comment at: clang-tools-extra/clangd/URI.cpp:29
+bool isWindowsPath(llvm::StringRef Path) {
+ return Path.size() > 1 && llvm::isAlpha(Path[0]) && Path[1] == ':';
----------------
ilya-golovenko wrote:
> sammccall wrote:
> > the UNC paths are also basically a windows thing, can we have hasWindowsDriveLetter and isWindowsNetworkPath (or isWindowsUNCPath)?
> This kind of network paths are also supported on Unix/Linux system, e.g. `//hostname/path/file.txt` and `isNetworkPath` will handle those as well. For example, samba and samba client support such paths. RFC 8089 calls them "non-local files" with unspecified type of protocol to access the file, i.e. it is not necessary a UNC path. Does it make sense to continue supporting Linux/Unix version of network path?
Ah, I wasn't aware. This seems fine to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84172/new/
https://reviews.llvm.org/D84172
More information about the cfe-commits
mailing list