[clang-tidy] report redundant `class`/`struct`/`union`/`enum` tag in declarations with C++
struct Struct {};
class Class {};
union Union {};
enum Enum{};
void f()
{
struct Struct S;
class Class C;
union Union U;
enum Enum E;
}
https://godbolt.org/z/hPGn1ePfx
In C++ it is unnecessary to specify the class/struct/union/enum tag.
@llvm/issue-subscribers-clang-tidy
Author: Oliver Stöneberg (firewave)
void f() { struct Struct S; class Class C; union Union U; enum Enum E; }
https://godbolt.org/z/hPGn1ePfx
In C++ it is unnecessary to specify the `class`/`struct`/`union`/`enum` tag.
</details>
@llvm/issue-subscribers-c-1
Author: Oliver Stöneberg (firewave)
void f() { struct Struct S; class Class C; union Union U; enum Enum E; }
https://godbolt.org/z/hPGn1ePfx
In C++ it is unnecessary to specify the `class`/`struct`/`union`/`enum` tag.
</details>
In C++ it is unnecessary to specify the
class/struct/union/enumtag.
The keyword may still be required in some cases:
struct S {} S;
void f() {
struct S x;
}
I am working on this , please assign it to me
I want to fix this it's so exciting , I need a few more days.