[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 07:02:02 PDT 2019


aaron.ballman added a comment.

In D66397#1639185 <https://reviews.llvm.org/D66397#1639185>, @xbolva00 wrote:

> I agree. And I think they should just use const int instead of macros after all.
>
> Maybe we should just improve silence hint if rhs is macro?
>  #define ALPHA_OFFSET 0x3 ?


I don't think we should try to suggest a fixit to fix the macro definition because the replacement list can be arbitrarily complex. We might be able to do something for a simple object-like macro whose replacement list is a single integer literal, but I'm not certain it's worth the effort (we don't go to those lengths with fixits elsewhere, that I'm aware of).


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

https://reviews.llvm.org/D66397





More information about the cfe-commits mailing list