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(),
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(),
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits