================ @@ -0,0 +1,31 @@ +.. title:: clang-tidy - cppcoreguidelines-use-enum-class + +cppcoreguidelines-use-enum-class +============================= + +Finds plain non-class ``enum`` definitions that could use ``enum class``. + +This check implements `Enum.3 +<https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-class>`_ +from the C++ Core Guidelines." + +Example: + +.. code-block:: c++ + + enum E {}; // use "enum class E {};" instead + enum class E {}; // OK + + struct S { + enum E {}; // use "enum class E {};" instead + // OK with option IgnoreUnscopedEnumsInClasses + }; + + namespace N { + enum E {}; // use "enum class E {};" instead + } + + ---------------- vbvictor wrote:
Please add this two lines before declaring options. ```rst Options ------- ``` See any other check with options for reference. https://github.com/llvm/llvm-project/pull/138282 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits