Issue 75663
Summary Unhelpful error message in clang frontend when compiler isn't sure if _expression_ is a function type or an _expression_
Labels clang
Assignees
Reporter hanickadot
    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(...)`
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to