<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/90046>90046</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [abi] mangled name issues for requires-clauses.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            tools:llvm-cxxfilt,
            ABI
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hokein
      </td>
    </tr>
</table>

<pre>
    Example 1:

```
template <typename T>
concept C = true;

template <typename T>
struct Foo {
  template <typename F>
  explicit Foo(F f)
    requires requires {
      requires C<F>;
    }
 {}
};

void k() {
 // mangled name for the Foo<double>::Foo constructor: _ZN3FooIdEC2IiEET_QrqQ1CITL0__EE
 Foo<double> f(1);
}
```

The mangled name `_ZN3FooIdEC2IiEET_QrqQ1CITL0__EE` is demangled incorrectly (note that `TL0`):

```
$ ./bin/llvm-cxxfilt _ZN3FooIdEC2IiEET_QrqQ1CITL0__EE
Foo<double>::Foo<int>(int) requires requires { requires C<TL0_>; }
```

Example 2:

```
template <typename T>
concept C = true;
template <typename T, typename U>
concept C2 = true;

template <typename T>
struct Foo {
  template <typename F>
  explicit Foo(F f)
 requires requires {
      requires C<Foo>;
      requires C<T>;
 requires C2<F, F>;
    }
  {}
};

void k() {
   // mangled name is _ZN3FooIdEC2IiEET_QrqQ1CIS_IS2_EEQ1CIS2_EQ2C2ITL0__S5_EE
 Foo<double> f(1);
}
```

The mangled name can not be demangled by `llvm-cxxfilt`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVU2L4zgQ_TXli5jglPx58CHt2BAYFprOXvYSZLkca0exMpY8dP_7xU6cjnu7e3YXBhaCKaVUr56q6knCWnXsiDIIHyDcemJwremz1nwj1XmVqV-y4lmczprYGvgG_C348zfyr79p6eh01sIRA567lzN14kRsD7y4uKXpJJ0dyxnwLXP9QMAf7uF-Em9dP0jHSmMYxNdAxt4NKm9BjNHzWSuppkDApGQNYDo7Gevp-6B6sq_GHfhiQw48n4D5nR_i7XUxhs2L0Vie7YdRNfsGmACmdxkAS8CSnUR31FSziXxjeuZamvjyvDZDpWlKuwG-GU8vTXephemBb9jhj994acyuLnLcqaLYHx7774_rfLf_6h8OxVyIN3BjGZL1WIob0Rv7ZVsv331LS5oQ-T_NHPlMWVbTHKg6afqepNMvDDDpjCPmWuFGsP3XKeVI6LMhAwzYCrCsVAdYav3j9EU-PzdKu39YiI_KCjxXnRv_wWQ0MH1_NpYDMUJfZoJ9Xr9ZQ_irNPRBJObstvr97zj4_xHjv1Ti2LGlFt_s2C_8ry6cdIw5-0TM_03N7F09K_vxZD4ddk94KIrJxkPxiDlexvUp_HXSlaJjnXGsojttVi-jCu8FBZG_8uqM1ylPhUfZOl4HfpDGHL02q9OaBDWS4jiVsUhr4gFWMkkan2TQNJ7K0MfADzBcYxhyXNVhFEUJTxuK04jXHAKfTkLp1ZhzZfqjp6wdKEt9P4g8LSrSdnqUEKUW3RH4pulN56irAREwB0RnjLbANwvas3PzsBvtcOv12bShGo4WAl8r6-xrVqecnl4_USkIt2-bZwey0508T9AXqcVgya68oddZ69x5ZHDp_FG5dqhW0pyul9N8R5178ydJB1heEAHL6Zx_BQAA___eLycD">