[clang] [Clang] Fix Itanium mangling crash for local lambda in ctor/dtor (PR #181068)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 4 18:40:12 PDT 2026


================
@@ -2221,6 +2234,22 @@ void CXXNameMangler::manglePrefix(const DeclContext *DC, bool NoFunction) {
   if (mangleSubstitution(ND))
     return;
 
+  // Constructors and destructors can't be represented as a plain GlobalDecl,
+  // and prefix mangling only needs their spelling.
+  if (isa<CXXConstructorDecl>(ND)) {
----------------
eiytoq wrote:

Done. I added a test for it as well.

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


More information about the cfe-commits mailing list