[clang-tools-extra] Add --project-root to clangd (PR #155905)
Mythreya Kuricheti via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 29 21:05:51 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;
----------------
MythreyaK wrote:
I was wondering if an error instead of a silent fallback helps with immediate user feedback, since this is an opt-in feature. Strong workspace's precondition is that a the directory should be set anyway.
https://github.com/llvm/llvm-project/pull/155905
More information about the cfe-commits
mailing list