| Issue |
184425
|
| Summary |
[clang] bad diagnostic for `>>` instead of `>` at end of alias declaration
|
| Labels |
good first issue,
clang:frontend,
clang:diagnostics
|
| Assignees |
|
| Reporter |
zygoloid
|
```c++
template<typename> struct X {};
using A = X<int>>;
```
[produces an incorrect diagnostic](https://godbolt.org/z/aE66PcjMP):
```console
<source>:2:18: error: expected ';' after alias declaration
2 | using A = X<int>>;
| ^
| ;
```
Note that the diagnostic points at a `;` and says it expected a `;` there, and the fixit hint suggests inserting a `;` where there already is one. This would be correct if the diagnostic pointed one character earlier (at the second `>`).
It looks like this issue is specific to tokens like `>>` that get split into two `>` tokens when parsing.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs