kadircet created this revision. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D81691 Files: clang-tools-extra/clangd/CodeComplete.cpp Index: clang-tools-extra/clangd/CodeComplete.cpp =================================================================== --- clang-tools-extra/clangd/CodeComplete.cpp +++ clang-tools-extra/clangd/CodeComplete.cpp @@ -1116,6 +1116,9 @@ Input.ParseInput.FSProvider->getFileSystem(); if (Input.Preamble.StatCache) VFS = Input.Preamble.StatCache->getConsumingFS(std::move(VFS)); + if (VFS->setCurrentWorkingDirectory( + Input.ParseInput.CompileCommand.Directory)) + elog("Couldn't set working directory during code completion"); auto Clang = prepareCompilerInstance( std::move(CI), !CompletingInPreamble ? &Input.Preamble.Preamble : nullptr, std::move(ContentsBuffer), std::move(VFS), IgnoreDiags);
Index: clang-tools-extra/clangd/CodeComplete.cpp =================================================================== --- clang-tools-extra/clangd/CodeComplete.cpp +++ clang-tools-extra/clangd/CodeComplete.cpp @@ -1116,6 +1116,9 @@ Input.ParseInput.FSProvider->getFileSystem(); if (Input.Preamble.StatCache) VFS = Input.Preamble.StatCache->getConsumingFS(std::move(VFS)); + if (VFS->setCurrentWorkingDirectory( + Input.ParseInput.CompileCommand.Directory)) + elog("Couldn't set working directory during code completion"); auto Clang = prepareCompilerInstance( std::move(CI), !CompletingInPreamble ? &Input.Preamble.Preamble : nullptr, std::move(ContentsBuffer), std::move(VFS), IgnoreDiags);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits