<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62361>62361</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] Invalid diagnostic when checking trailing requires of inherited ctor
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alimpfard
</td>
</tr>
</table>
<pre>
Bisected to aeee4ebd6891, present in main (7090c102731192d5abafb7e0b2b49adb4912efae).
Reduced test case:
```c++
template <typename T, typename U> inline constexpr bool IsSame = false;
template <typename T> inline constexpr bool IsSame<T, T> = true;
struct Empty {};
struct X {};
template <typename T, typename E = X> struct Test {
Test()
requires(IsSame<T, Empty>);
};
template <typename XType>
struct Test<void, XType> : public Test<Empty, XType> {
using Test<Empty, XType>::Test;
};
void foo() {
Test<void>();
}
```
Accepted before aeee4ebd6891, error since:
```
test.cpp:18:5: error: invalid reference to function 'Test': constraints not satisfied
Test<void>();
^
test.cpp:9:14: note: because 'IsSame<X, Empty>' evaluated to false
requires(IsSame<T, Empty>);
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE-PozYU_zTm8rQR2BDgwCGTTKS9tlNprsZ-JG6NTW0z7Xz76kGSSXa721EjRAD__Pvz_GwZozk5xI5VT6w6ZHJOZx86ac04DTLorPf6vXsyEVVCDcmDRMQSe71t2oLxPUwBI7oExsEojQPGmzpvc1XkvBZF0XJdyV4OfY15z_uylbov24LjIJHxdsPyA8t36_0X1LMiFYwJlIzIxGWEbfP1Uow_0bV8TThOViYEJvbpfUInR4QXMnV7-42JZzDOGoegvIsJ_54C9N5b-Bp_JQQTBxikJbGf0_4HERP7RXoBEmkK8wfneo8pzCrB8zild2D1E6sPN8Rl7PXb75-Ouqq-kvyF64XqSHQLBSzvjDeMt9cvAAH_nE3AyHjzmGMxycQzoW9ePufr9eV9Qpp6H2wRF_s3bzTRXzHAxA6mubdGXSGr8gPmI8McjTv9EEkNI3br6A89kwUYvF9LcUd-b5GCN99mf-zFe86dUjjRDulx8AG_2yUYgg8QjVP_0tTXUsa0UdPExK5omNhVVJllHj0Y9yat0RBwwIBOIe3FYXYqGU-brl4Xtybs0p9BGpciOJ8gymTiYFB_LPtPoxKAVc_f2WrJWkkKzifKAT0qOUck_Vv3vD52Tw34Ju0sL8fHutX-X_vB_e9m8FbGTHdCt6KVGXbFtuFlWVW8zc5dxUXfCl0MXNZVUeS83eZNXtS53lZbXvWZ6XjORV7yqqirpmw3-cAH1fB6EFLpBhUrcxylsRtr38aND6fMxDhjt-ViW2RW9mjj9QgNHYG-9PMpsjK3Jqb4MS2ZZJfDdm-lO7HqAF8vC6uNPDkfk1Hw1xkdqDOqP6jXaSUtPVxrBX4A484YDNVUJR-yOdjunNIUqbn4kfHjyaTz3G-UHxk_kvzl78sU_O-oEuPHJUJk_Lik-CcAAP__ppjIkA">