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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 3 13:55:13 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)) {
----------------
efriedma-quic wrote:

Do we need any special handling if the constructor is a template?

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


More information about the cfe-commits mailing list