<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75663>75663</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Unhelpful error message in clang frontend when compiler isn't sure if expression is a function type or an expression
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hanickadot
</td>
</tr>
</table>
<pre>
https://compiler-explorer.com/z/Yn7oa1avd
```c++
template <typename> struct function { };
template <typename T> void foo() {
using get_func_t = function<bool(T::pointer)>;
}
```
Gives error:
```
<source>:4:33: error: template argument for template type parameter must be a type
4 | using get_func_t = function<bool(T::pointer)>;
| ^~~~~~~~~~~~~~~~
<source>:1:19: note: template parameter is declared here
1 | template <typename> struct function { };
| ^
1 error generated.
Compiler returned: 1
```
I would expect hint to add typename like what happen if I remove `bool(...)`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVM9zqzgM_mvERVMG7ADhwCE_mp3eu4c9dQxWwFtjM7ZJ2z3s3_7GJC9JO513ePMyDjBC-vR9kpDwXvWGqIFiC8U-EXMYrGsGYVT3KqQNSWvlRzOEMHngG2AHYIfOjpPS5B7ofdLWkUs7OwI7_Afs8I-prMjFSUK2h2xzuZbZ-XTAtvEs1kDjpEUgBL4LHxMZMRLwR_TBzV3A42y6oKxBqLYI1R749h7zu2h8jvEnqyQerQW2BlbH8HMEzl6ZHnsKLxH7JSDw_TUN8F1rrQa2fo5C-WayygRywGrgj7fk1f6LpntSf6kTeSTnrIsg3zrynbez62hB3ayAbzgHvrlG4VWZcP08kgl4tO5mjWJxEk6MFMjhOPuALaFYXlyUIuIKodrFhz8iewFaEKF4_P_z71tdefzXUY6xgT7JunFXHiV1WjiSOJC7Y58vuX53Qj6xPZvyc32xJ0NOBJLp2b67zDI6CrMzJCPV_BctfsI3O2uJ9D5RF3BQJmCwKKTE6xhq9Ur4NoiAg5gmMqiO-ISORnsihDK7VDxN01jmMktkw2XNa5FQk1cZK6uqrFgyNKVcSdl2tG6zgtqibvM6b6ucybpislyvE9WwjPGc5QVjWZ6ztKRVKZgsqM3yissaVhmNQulU69OYWtcnyvuZmqooS55o0ZL2y8fPWKeF6YGxuAdcE_0f2rn3sMq08sHfEIIKmpq_zUB6Os76UtmRvBc9oTK4IOHRWRPISHwbyODPpYHKG2BVQD87ioWh98mR97GPyqO4dXUZdOtQmHufZHb6yz7qVRjm9rKEIsvL7WFy9l_qArDDItoDOyy6fwQAAP__4YeH7w">