ioeric added inline comments.
================
Comment at: clangd/ClangdServer.cpp:119
+ auto FS = FSProvider.getFileSystem();
+ auto Status = FS->status(RootPath);
+ if (!Status)
----------------
sammccall wrote:
> why validate it?
This is the current behavior, except `llvm::sys::fs::is_directory` only works
for real file system.
================
Comment at: unittests/clangd/TestFS.cpp:93
return URI(Scheme, /*Authority=*/"",
- llvm::sys::path::convert_to_slash(Body));
+ StringRef(llvm::sys::path::convert_to_slash(Body)).ltrim('/'));
}
----------------
sammccall wrote:
> why this change?
The `consume_front` above would not consume the second slash in
`/clangd-test/x.h` which results in "/x.h" in the body, but that doesn't work
with `testPath()` which requires a relative path. That's why I added a
requirement that the body should be relative path.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48290
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits