<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/61745>61745</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang produces unhelpful diagnostic when attempting to access a nested-name-specifier from a concept
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cjdb
</td>
</tr>
</table>
<pre>
```cpp
template<typename T>
concept foo = true;
template<typename T>
void bar(T t)
{
if constexpr (foo<T>::value)
{
}
}
```
Given this GCC test case, Clang emits the following diagnostic:
```
error: template name refers to non-type template 'foo'
if constexpr (foo<T>::value)
^
note: template template parameter 'foo' declared here
concept foo = true;
^
```
Although the message is communicated, `foo` is neither a non-type template parameter nor a template template parameter, and this is
It would be clearer if we said something along the lines of
```
error: concepts don't have any members to access
if constexpr (foo<T>::value)
^~~~~~~
note: concept 'foo' declared here
concept foo = true;
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklN-u2ygQxp8G34xyROD434Uv0pym2vu-AIaxTYXBgnGy52affYWTnKTbqqq6KFKwYIb5vh-DSsmOHrFj5SdWvhVqpSnETn8zfdEH896xil9_elkYf2P8QDgvThEyeaT3Bb2aEb4y-fm6qoPXuBAMIQCTb0BxRSY_XRd_J8E5WAO9ikw0X4GYaG-h9S0HgB1AB58I_14iMNEMITB53DLIA5OHs3IrfgQCPIWy-u2e7j6567t-frFn9ECTTfDleATCRKBVQiaOcHTKj4CzpQQ0IQzBuXCxfgRj1ehDIqtzBT_LizGGyOQB7uJhkx1xwJiAAvjgd9mNxwYm6qxM1H-q-_vBypvBPmTrnyr5mCwqqhkJ4-NsMKidimhgwoi_gfiH4_5jxMHRFNZx2hycMSU1ItgEOszz6q1WhCabzSqeK6h4XvRoacII6ic2PYr2Ie_4haycV3lzxWsTPF_KvwguYXUGegTtUEWM2fALQlLWQAoz0pRZKxf8uFXvrMcEYfg18JtbCUzwTNQEkzojKP8OM879jb7SGlP6Q9Cs_PzPNr7ne8f0P1j-CLEwnTStbFWB3b6q27aSe9EWU1dK06JqG2Na1GXTlLxVXO15xWvTN_uhsJ3gQnIpGs5FKdoXw4dKYtuU-_3QI9fsleOsrHtx7jy_hDgWNqUVu2pfv5aFUz26tD1TQujciUweHn2XmBD5_Ypdjt7165jYK3c2UXrkI0sOu2sbLzGYVWOC1U_olmF1T10Mlwk9KMpXiDL0D0T5CmIiNLvcv7u0oLaDxQhDDDOou-nFGl03ES0pExMnJk6jpWntX3SYmTjlkm5_uyWGb6iJidOmNzFx2iT_GwAA__-fjrvh">