[clang-tools-extra] Add --project-root to clangd (PR #155905)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 27 22:36:16 PST 2025


================
@@ -117,6 +122,12 @@ class DirectoryBasedGlobalCompilationDatabase
     // Only look for a compilation database in this one fixed directory.
     // FIXME: fold this into config/context mechanism.
     std::optional<Path> CompileCommandsDir;
+    // Working directory for fallback commands
+    // If unset, parent directory of file should be used
+    std::optional<std::string> WorkingDirectory;
+
+    void
+    applyWorkingDirectory(const std::optional<std::string> &&WorkingDirectory);
----------------
HighCommander4 wrote:

What is the purpose of using `const &&` here?

https://github.com/llvm/llvm-project/pull/155905


More information about the cfe-commits mailing list