[clang] [clang][ItaniumMangle] Fix mangling of lambdas in default member initializers of local classes (PR #206740)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 07:16:02 PDT 2026
================
@@ -1945,8 +1944,13 @@ void CXXNameMangler::mangleLocalName(GlobalDecl GD,
mangleUnqualifiedBlock(BD);
} else {
const NamedDecl *ND = cast<NamedDecl>(D);
- mangleNestedName(GD, Context.getEffectiveDeclContext(ND),
- AdditionalAbiTags, true /*NoFunction*/);
+ const NamedDecl *PrefixND = getClosurePrefix(ND);
+ if (PrefixND && !isCompatibleWith(LangOptions::ClangABI::Ver18))
+ mangleNestedNameWithClosurePrefix(GD, PrefixND, AdditionalAbiTags,
+ true /*NoFunction*/);
+ else
+ mangleNestedName(GD, Context.getEffectiveDeclContext(ND),
+ AdditionalAbiTags, true /*NoFunction*/);
----------------
erichkeane wrote:
```suggestion
AdditionalAbiTags, /*NoFunction=*/true);
```
https://github.com/llvm/llvm-project/pull/206740
More information about the cfe-commits
mailing list