<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJy1VE1zmzAQ_TVw2TGDRSDmwCEhSU85NdO7vjBqZImRRFz313clJ_ijnemhzYyMtdKy7z30VsyKQ9drarYgrPRgbACh6NZYL6HPyD0OGGbDg7IGgtxNmgbMo0bAG3WKMi2XZRCSa-pozPWwV2GEMEowdCfBDkCXxNWEWTsZpMtIn5UPWXm3HxUfYXB2B7sDOEmFQk4qMjIrbs1g3Q5XimP2-7Mpj4NP03FlYZJVPZ2DBZpVj3Dce7NKYEw2GWmz6h4y8oQD638IDoojHZA_JsmDxFykcaYIpHPWneOfo4XDJJNQdoXIPh2RnxCTZo67D1D-f8RUXVyhic9CW_SdIeKr3seFBcy-4mwDSutVtIgUEZD6BTN--kuznOPdW_Tol75Pfn7--q0HbiMDZYAyO4dLvj5C9Y-glXmFMYTJZ9XdkcfWCmZ1KKzbYvQTfxvbSs7Gtj4xSM-X8dRYPiAudQI8klWDkv49EwW__KVzwI9U69SwDF1nZ1QQDW8OMFit7T72z_nHxiYKKAyPgR1SX3puJxnfOfZeXPoDDJPamq2_aLyofZEupS6Uxwk_qhKODgHDWKtwKIlUaaotp3rV5KKrRFu1NEf7jNZ13LrKBGXy2enu6qviFTKzAs8EA63fPv5Wk7Pf8XgxVN7PEeOprlpS52PHmg1rbmVNSr5uG14LgmA31bohkq3bcp1ripJ8l9VIlhi5h1QC51n9kP87A9WRkuBYb9britxsinbgZTvQRrCaSnJLsptS7qjSRawTDZO7LpVk89bjplY--NMmGl5tjZSJMDIMKugU8Hhr4wo8I4N02EvTAR73hW_RQ8slnpHm96v77Lr20XTJedhGJ-fBYokiT5K7pPcXOlMESQ>53925</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang] Missing diagnostic on declarations of function & variable templates with the same name as a template parameter.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cor3ntin
</td>
</tr>
</table>
<pre>
Clang does not diagnose C++ function templates and variable template declarations with the name of a template-parameter,
which from my reading is non-conforming.
```cpp
template <auto a>
void a(); // no diagnostic, expected a redeclaration error
template <typename b>
void b(); // no diagnostic, expected a redeclaration error
template <typename c>
auto c = 0; // no diagnostic, expected a redeclaration error
template <auto d>
auto d = 0; // no diagnostic, expected a redeclaration error
template <typename d>
class d; // ok ( ill-formed, as expected)
```
Both GCC and MSVC complain about redeclarations (CE link https://godbolt.org/z/8o9ecbh95)
The C++ standard specifies
> The name of a template-parameter shall not be bound to any following declaration contained by the scope to which the template-parameter belongs.
http://eel.is/c++draft/temp.res#temp.local-6
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VE1z2yAQ_TXosmONjCzHOugQK0lPOTXTO1-yaBBoAMV1f30XOZXttDO9NDNY5mPhvbe8hTt5alrD7AGkUwGsiyA1O1gXFLSE7rFBN1kRtbMQ1TAaFjGOWQlvzGvGjVqmQSphmGcpNsBRxx5ir8CyQYHrgC2BqxGjBhWVJ7QlxQMp7o-9Fj103g0wnMArJjVy0omRXQlnO-cHnMnP0e_fbXFuYhzPMwsTUrZsig4YKR_hvPbmtMQx3RFak3IPhD5hw_N_C45aIB1QP0YlosJYpHGlCJT3zl_jX6PF06hmofwDIv90RHFBnDULXH2A4v8jzqfLD2jys9AWfVeIuDWENLGAuVfs7UAbs0oWUTIBsrBgptTfmuUab-_Qo1_advbz89dvLQiXGGgLjLsp3vINCap9BKPtK_QxjoGU92ceBye5MzF3_oCjn_jbuVoJ3tfVhcH8fekvhRUi4jIvISBZ3WkV3iNR8Ms_KgdCz4yZC5aj69yECpLh7Qk6Z4w7pvq5TjYWUURheA38NNdlEG5Uac-59tLUX2C4Ms4ewk3hJe2LdKVMrgN2xFmV9KyLOExn5R4l0XLuGieYWW0z2ZSyLmuWRR2Naki1F-n9IdUDPOsQZtqLfQCJ39wAZmN5jgjd_vkIXT08IaVvziEa4pJDWMTl2eRN8-EmcffEc_QBDox5-_23Gr37jpbCIbKckq6nqqxplfVN1xVrsS0kKytFd5tqt7nb8o6ru07yzZptM8MwjSFpJZRadYT5COyj6kw3tKDY1rv1uqSbXV53oqg7tpW8YoreUbIp1MC0yROPZLHMNzMlPh0CLhodYrgsYonog1VzatP5WKa9841wvrRR22zGbmbuvwAAZu_i">