<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112222>112222</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang++] Crash when parsing out-of-class definition of member function with trailing requires clause
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
PiliLatiesa
</td>
</tr>
</table>
<pre>
I'm observing crashes when compiling the following snipped with clang trunk. Clang 19 doesn't crash.
``` c++
#include <cstdint>
template<typename T>
class TExprBase;
template<std::size_t dim, std::size_t rank, template<std::size_t, std::size_t> typename T>
class TExprBase<T<dim, rank>>
{
public:
void Curl() const requires (dim == 3u && rank == 1u);
};
template<std::size_t dim, std::size_t rank, template<std::size_t, std::size_t> typename T>
void TExprBase<T<dim, rank>>::Curl() const requires (dim == 3u && rank == 1u)
{
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVE1vm0AQ_TXDZWQLZm0DBw4xtqVKPfSQe7Usg9lmYel-OE1_fQV2kqZq1B56qLQCzdO8-XjsQ3qvzyNzBds9bA-JjKG3rvqkjf4og2Yvk8a2T9UHoHxA23h2Fz2eUTnpe_b42POIyg6TNjMcesbOGmMf58iPepq4xUcdelRGzgkujg9rrJcgK7G17EegPFwrriE9QHp3e-7S60EFtJ_PFSahR2ViywiiVj60egwgjj9TAw-TkYFB1OFp4lEOjPcvOcpI7_H--G1ye-kZxP4drg8tiDsQd15_588BWz0A1fgr7OT4MOPvM3_DAnHEv5mtvgdR3xovjcTxddn8NvkUG6PVXH4JES9Wt1hHZ4AKoBKVHX1Ax1-jduwRqGj1gCAOIA4oIgLtgHZLg2c0i0Dlqzb54b_SaVnwzzIthf6FDm_1ntV4e0evYdJWoi1FKROuspyKMisLKpK-arKd4rYtSOVik6s2z2S-a7qSVNdQJ0SiK0ppk6XZJtuKlHbrImWVdV2262QnCiFgk_IgtVkbcxnW1p0T7X3kKsuIiBIjGzb-2caumrNWTTx72KRG--BfeUEHsxh-seTNWtsD1rMDr46epPOzg20MK9utrpey5U6POmg7ou1w4KFhh10c1QItJg9OXn8ELworI6PnJDpT9SFMfv4idAI6nXXoY7NWdgA6zbPdXqvJ2S-sAtBpWdADnW47Xir6EQAA___JX221">