[libcxx-commits] [clang] [libcxxabi] [clang][ItaniumMangle] Mangle friend function templates with a constr… (PR #110247)

Utkarsh Saxena via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 27 06:15:40 PDT 2024


================
@@ -2270,6 +2270,14 @@ void CXXNameMangler::mangleTemplatePrefix(GlobalDecl GD,
     mangleTemplateParameter(TTP->getDepth(), TTP->getIndex());
   } else {
     const DeclContext *DC = Context.getEffectiveDeclContext(ND);
+    if (const auto *FD = dyn_cast<FunctionTemplateDecl>(GD.getDecl())) {
----------------
usx95 wrote:

We should move this logic to `getEffectiveDeclContext(ND);`. We already handle `FunctionDecl` for friends there.

You can check for `dyn_cast<FunctionTemplateDecl>(D)` which is unhandled.


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


More information about the libcxx-commits mailing list