[clang-tools-extra] Add check 'modernize-use-enum-class' (PR #138282)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 09:06:42 PDT 2025


https://github.com/vbvictor commented:

Overall, good niche check that may find its user, however some work need to be done.

Move this check to `cppcoreguidelines-` section, you can use `clang-tools-extra\clang-tidy\rename_check.py` for that.
`modernize-` checks are used for smooth codebase improvements, and they should not (hopefully) break any existing code in any way (e.g. no changes to behavior, no new compiler errors). In your case, automatically converting `enum` to `enum class` will probably create hundreds compiler errors for big codebases, and that does not align with `modernize` philosophy.

https://github.com/llvm/llvm-project/pull/138282


More information about the cfe-commits mailing list