================ @@ -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(); ---------------- usx95 wrote:
This looks quite a tech debt. I am not aware of our policy regarding the past ABIs we should be supporting, but there definitely should be a time limit. We should add a fixme to remove ABI checks after supported time ``` FIXME: Remove check for Ver17 and use D->getAsFunction() after clang-X FIXME: Remove check for Ver19 after clang-Y ``` @zygoloid Are you aware of a reasonable clang version (X and Y here) after which we should stop supporting Ver17 ? I can guess maybe 1-3 years ? https://github.com/llvm/llvm-project/pull/110503 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits