[PATCH] D81691: [clangd] Set CWD in semaCodeComplete
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 11 14:54:53 PDT 2020
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf44d2424f8d7: [clangd] Set CWD in semaCodeComplete (authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81691/new/
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81691.270243.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200611/cf9d4ac7/attachment.bin>
More information about the cfe-commits
mailing list