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

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 14:37:59 PST 2022


LegalizeAdulthood added a comment.

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

> I'm mostly interested on the warning message, [...]

I'm open to changes in the wording of the warning message.

> I get an error when downloading, do you happen to know what could be wrong?

I haven't used arcanist, I've created the review by uploading the diff from git.

You should be able to download the raw diff and then use `git apply` to apply
the diff to your working tree.

I tested with a clone of [[ https://github.com/LegalizeAdulthood/iterated-dynamics | iterated dynamics  ]]from github.
That code originates as multi-decade old C code which I've incrementally modernized
and has lots of integral constant macros in it.  That led me to some improvements over
the first version of this that I put up for review.

>> This check is more about implementing Enum.1 Prefer enumerations over macros.
>
> Should a `cppcoreguidelines` alias be added in that case?

Yeah, I think I'm going to add that.


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

https://reviews.llvm.org/D117522



More information about the cfe-commits mailing list