================
@@ -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:
It's worth a comment explaining why we need a fallback here. Something like
"the user asked for strong workspace mode, but the client didn't provide a
workspace path, so use the working directory as a fallback".
https://github.com/llvm/llvm-project/pull/155905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits