llvm-project
llvm-project copied to clipboard
[Clang] Accepts invalid auto on a declaration of class
auto class X1 { } ;
See Compiler Explorer: https://godbolt.org/z/3WheK64E3 auto can only be specified for variables or function declarations.It is rejected by GCC, but accepted by Clang.
@llvm/issue-subscribers-clang-frontend
Author: None (YuchangSu)
```
auto class X1 { } ;
```
See Compiler Explorer: [https://godbolt.org/z/3WheK64E3](https://godbolt.org/z/3WheK64E3)
auto can only be specified for variables or function declarations.It is rejected by GCC, but accepted by Clang.
This goes back a while: https://godbolt.org/z/P41x96f4x