[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 4 06:21:50 PDT 2025
================
@@ -0,0 +1,35 @@
+.. title:: clang-tidy - cppcoreguidelines-use-enum-class
+
+cppcoreguidelines-use-enum-class
+================================
+
+Finds unscoped (non-class) ``enum`` declarations and suggests using
+``enum class`` instead.
+
+This check implements `Enum.3
----------------
vbvictor wrote:
Should it?
I've seen that most of cppcoreguidelines checks have this in the beginning.
I suppose it's encouraging user to read actual guidline before reading check documentation.
Some random examples I clicked right now:
https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-capturing-lambda-coroutines.html
https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/avoid-do-while.html
https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/interfaces-global-init.html
https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-bounds-constant-array-index.html
https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/prefer-member-initializer.html
https://github.com/llvm/llvm-project/pull/138282
More information about the cfe-commits
mailing list