[clang-tools-extra] Add --project-root to clangd (PR #155905)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 8 22:57:26 PST 2025
================
@@ -460,6 +462,17 @@ DirectoryBasedGlobalCompilationDatabase::lookupCDB(
return Result;
}
+void DirectoryBasedGlobalCompilationDatabase::Options::applyWorkingDirectory(
+ const std::optional<std::string> &&WorkingDirectory) {
+ if (WorkingDirectory)
+ this->WorkingDirectory = *WorkingDirectory;
+ else {
+ SmallString<256> CWD;
----------------
HighCommander4 wrote:
I tweaked the comment wording a bit here. I think it's important to mention that it's the LSP client not providing a workspace path that necessitates a fallback (or error) here, i.e. something we as the server can't control.
https://github.com/llvm/llvm-project/pull/155905
More information about the cfe-commits
mailing list