[clang-tools-extra] Add check 'modernize-use-enum-class' (PR #138282)
Philipp Jung via cfe-commits
cfe-commits at lists.llvm.org
Fri May 9 08:49:43 PDT 2025
================
@@ -0,0 +1,26 @@
+.. title:: clang-tidy - modernize-use-enum-class
+
+modernize-use-enum-class
+=============================
+
+Scoped enums (enum class) should be preferred over unscoped enums:
+https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-class
+
+Unscoped enums in classes are not reported since it is a well
+established pattern to limit the scope of plain enums.
----------------
JungPhilipp wrote:
Done
https://github.com/llvm/llvm-project/pull/138282
More information about the cfe-commits
mailing list