[clang] [clang] Don't use `VarDecl` of local variables as `ManglingContextDecl` for lambdas (PR #179035)

Jan Kokemüller via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 4 02:51:10 PST 2026


jiixyj wrote:

> Can't we just avoid setting the ManglingContextDecl as a local VarDecl, instead of filtering it out later? It seems that would be simpler.

Good idea! Do you think the logic checking for modules (i.e. the `ND->isInNamedModule() || ND->isFromGlobalModule()) && ND->isExternallyVisible())`) can then also be done at the place where `ManglingContextDecl` is set?

I'll try it and report back.

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


More information about the cfe-commits mailing list