[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 12:37:23 PDT 2024


================
@@ -704,6 +704,15 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) {
       return D->getLexicalDeclContext()->getRedeclContext();
   }
 
+  if (const auto *FTD = dyn_cast<FunctionTemplateDecl>(D)) {
+    // Member-like constrained friends are mangled as if they were members of
+    // the enclosing class.
+    if (FTD->getTemplatedDecl()->isMemberLikeConstrainedFriend() &&
+        getASTContext().getLangOpts().getClangABICompat() >
+            LangOptions::ClangABI::Ver19)
+      return D->getLexicalDeclContext()->getRedeclContext();
----------------
zygoloid wrote:

We have maintained more burdensome things for ABI compatibility for longer. I don't think we have a policy for removing old ABI things, but some Clang users depend on setting the ABI compat back quite a long way. Establishing a policy seems like a good idea.

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


More information about the cfe-commits mailing list