llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.02k stars 11.57k forks source link

support AUTOSAR C++14 Rule A7-2-4 readability-enum-initial-value #85243

Closed HerrCai0907 closed 5 months ago

HerrCai0907 commented 6 months ago

In AUTOSAR C++14 Rule A7-2-4

Rule A7-2-4 (required, implementation, automated) In an enumeration, either (1) none, (2) the first or (3) all enumerators shall be initialized.

This check want to detect explicit initialization of a part of enumerators in an enumeration, and relying on compiler to initialize the others. It causes readability issues.

llvmbot commented 6 months ago

@llvm/issue-subscribers-clang-tidy

Author: Congcong Cai (HerrCai0907)

In AUTOSAR C++14 Rule A7-2-4 > Rule A7-2-4 (required, implementation, automated) > In an enumeration, either (1) none, (2) the first or (3) all enumerators shall be initialized. This check want to detect explicit initialization of a part of enumerators in an enumeration, and relying on compiler to initialize the others. It causes readability issues.