From 016d88eb5264b8f8efaf5cd74fa3f627d33e3695 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Tue, 13 Feb 2018 17:15:06 +0000 Subject: [clangd] Log if CWD could not be changed. NFC. --- clang-tools-extra/clangd/ClangdUnit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang-tools-extra/clangd/ClangdUnit.cpp') 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 CI; -- cgit v1.2.3