[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)
Petr Polezhaev via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 18 04:00:22 PST 2025
================
@@ -833,8 +833,8 @@ bool OverlayCDB::setCompileCommand(PathRef File,
std::unique_ptr<ProjectModules>
OverlayCDB::getProjectModules(PathRef File) const {
auto MDB = DelegatingCDB::getProjectModules(File);
- MDB->setCommandProvider([&Mangler = Mangler](tooling::CompileCommand &Command,
- PathRef CommandPath) {
+ MDB->setCommandMangler([&Mangler = Mangler](tooling::CompileCommand &Command,
----------------
petr-polezhaev wrote:
@kadircet this is what I was talking about with unsafe reference capturing. The solution (while keeping lambda compatibility for unit-tests) would be to make the function copyable but pass the Mangler by the `shared_ptr` into the very first instance.
https://github.com/llvm/llvm-project/pull/122606
More information about the cfe-commits
mailing list