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

    <tr>
        <th>Summary</th>
        <td>
            std::enable_if mangling different in clang >= 18 compared to clang <= 17 or gcc
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Romain-Geissler-1A
      </td>
    </tr>
</table>

<pre>
    Hi,

While migrating to clang 18, we hit a name mangling difference compared to clang 17 (or gcc).

The following snippet:

```
#include <type_traits>

template <typename T> class SomeCondition
{
 public:
        static constexpr bool value = true;
};

template <typename T, typename std::enable_if<SomeCondition<T>::value, int>::type = 0> void SomeFunction(const T&);

void f()
{
 SomeFunction(0);
}
```

eventually leads to clang 18 mangle the call to SomeFunction as `_Z12SomeFunctionIiTnNSt9enable_ifIXsr13SomeConditionIT_EE5valueEiE4typeELi0EEvRKS1_` (see Compiler explorer: https://godbolt.org/z/Khv93qxvf) while clang 17 does mangle it as `_Z12SomeFunctionIiLi0EEvRKT_` (Compiler explorer: https://godbolt.org/z/WKeanb15P), and gcc as well (Compiler explorer `https://godbolt.org/z/1eqGKdnzY`).

Is this change with clang 18 expected ?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVNtu4zYQ_Rr6ZRBDInWxHvTgyPY2SFEUGwPb9sWgyLHEgiK1ImUn-_UFZcdxnLQF1jB048yZc-bGnVONQSxJek_S1YyPvrVD-dV2XJm7L6ic0zjcxctZbeVL-YsitCLRikTL0_VbqzRCp5qBe2Ua8BaE5qaBeEFoBUeEVnngYHiH0HHT6GAl1X6PAxqBIGzX8wHllWcOhC7sAI0QhBbz63DbFmFvtbbHAOOM6nv0hC2vbUgWnf-nV8qUEXqUCIRV_qXHnR-48o6w9bWbx67X3F-sJsZbwtaBlnPwZDusrJHKK2vOjvn96QH6sdZKXIjA-ec890qAsMZ5fO4HqK3VcOB6DGFW4IcRCbt_RVu9Pf8XJVrB5c15GaKyJRpea9ypPWHVe6qsCipOVlPoAKCMv3wMYBOdKKg9WCUnsZvRiAmALiYBIXJGaHFDcrLfE7oIRzdpuYGJ3nnnq8_rNV3xgMaPXOsX0Milu26sUx8h-BZBcK3D2XUk4A5IFu3-iun15we1Nb89-eKSqYc_3BCzd8l62O7W63TK0lqtk5CZ9a8qWq8PXx-f4h3JotCbDhEq2_VK4wD43Gs74EDYElrvexeSSjeEbhora6v93A4NoZsfhG4e20PBvj8f9oQWcJxG59Lz0qJ7VRZG5l80vLLZvpL5KSLfHpGbOk5_DxWhFXAjw7iFqEfU-lPcwOf_cGP8_uVRmh9_hnLezO6DA98qB6LlpkE4Kt--lRSfexQeJRC2mcmSyYIVfIZlnMdRnhdxnM_aMqozhiLJEyZlUsi9YDLNuKgzSRdsj4uZKmlEk4jFizijaZzPOWZxnkaySBZJmmBEkgg7rvRc60MXeM-UcyOWizRLs5nmNWo3rUJKJ2qE0rAVhzLY39Vj40gSaeW8e0PwymssPw7ix3XnQZmz5Gn4VkH5xwVIWDWd5XBagrNx0OVN5pVvx3oubEfoJjA53-76wf6NwhO6mYQ5QjeTtn8CAAD__3xe1fc">