mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
[clangd] Set CWD in semaCodeComplete
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81691
This commit is contained in:
@@ -1116,6 +1116,9 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user