[PATCH] D117522: [clang-tidy] Add modernize-macro-to-enum check

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 3 10:09:41 PST 2022


LegalizeAdulthood added a comment.

In D117522#3290604 <https://reviews.llvm.org/D117522#3290604>, @carlosgalvezp wrote:

> This will conflict with `Enum.3` from `cppcoreguidelines`

I went back and looked at Enum.3 Prefer class enums over “plain” enums <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#enum3-prefer-class-enums-over-plain-enums>,
and implementing that is the second-pass check I discussed earlier.

This check is more about implementing Enum.1 Prefer enumerations over macros <https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#enum1-prefer-enumerations-over-macros>.

This brings up the question of whether or not there should be a cppguidelines alias
for this check.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117522/new/

https://reviews.llvm.org/D117522



More information about the cfe-commits mailing list