================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits