[PATCH] D45692: [clangd] Fix "fail to create file URI" warnings in FileIndexTest.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 16 08:35:16 PDT 2018
hokein created this revision.
hokein added a reviewer: ioeric.
Herald added subscribers: MaskRay, jkorous-apple, ilya-biryukov, klimek.
When running the FileIndexTest, it shows "Failed to create an URI
for file XXX: not a valid absolute file path" warnings, and the
generated Symbols is missing Location information.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45692
Files:
unittests/clangd/FileIndexTests.cpp
Index: unittests/clangd/FileIndexTests.cpp
===================================================================
--- unittests/clangd/FileIndexTests.cpp
+++ unittests/clangd/FileIndexTests.cpp
@@ -94,8 +94,8 @@
"BasePath must be a base file path without extension.");
llvm::IntrusiveRefCntPtr<vfs::InMemoryFileSystem> VFS(
new vfs::InMemoryFileSystem);
- std::string Path = (BasePath + ".cpp").str();
- std::string Header = (BasePath + ".h").str();
+ std::string Path = testPath((BasePath + ".cpp").str());
+ std::string Header = testPath((BasePath + ".h").str());
VFS->addFile(Path, 0, llvm::MemoryBuffer::getMemBuffer(""));
VFS->addFile(Header, 0, llvm::MemoryBuffer::getMemBuffer(Code));
const char *Args[] = {"clang", "-xc++", "-include", Header.c_str(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45692.142638.patch
Type: text/x-patch
Size: 790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180416/3efba414/attachment.bin>
More information about the cfe-commits
mailing list