diff options
Diffstat (limited to 'clang-tools-extra/clangd/ClangdUnit.cpp')
-rw-r--r-- | clang-tools-extra/clangd/ClangdUnit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 9db97b466c9..d0dfe6833a8 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -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; |