forked from OSchip/llvm-project
[clangd] Log if CWD could not be changed. NFC.
llvm-svn: 325024
This commit is contained in:
parent
b39094e39e
commit
a9cf311d5b
|
@ -379,7 +379,11 @@ CppFile::rebuild(ParseInputs &&Inputs) {
|
|||
for (const auto &S : Inputs.CompileCommand.CommandLine)
|
||||
ArgStrs.push_back(S.c_str());
|
||||
|
||||
Inputs.FS->setCurrentWorkingDirectory(Inputs.CompileCommand.Directory);
|
||||
if (Inputs.FS->setCurrentWorkingDirectory(Inputs.CompileCommand.Directory)) {
|
||||
log("Couldn't set working directory");
|
||||
// We run parsing anyway, our lit-tests rely on results for non-existing
|
||||
// working dirs.
|
||||
}
|
||||
|
||||
// Prepare CompilerInvocation.
|
||||
std::unique_ptr<CompilerInvocation> CI;
|
||||
|
|
|
@ -642,7 +642,11 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
|
|||
for (const auto &S : Input.Command.CommandLine)
|
||||
ArgStrs.push_back(S.c_str());
|
||||
|
||||
Input.VFS->setCurrentWorkingDirectory(Input.Command.Directory);
|
||||
if (Input.VFS->setCurrentWorkingDirectory(Input.Command.Directory)) {
|
||||
log("Couldn't set working directory");
|
||||
// We run parsing anyway, our lit-tests rely on results for non-existing
|
||||
// working dirs.
|
||||
}
|
||||
|
||||
IgnoreDiagnostics DummyDiagsConsumer;
|
||||
auto CI = createInvocationFromCommandLine(
|
||||
|
|
Loading…
Reference in New Issue