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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 05:47:00 PDT 2019


aaron.ballman added a comment.

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

>   >> suggested source-code fixit of #define ALPHA_OFFSET 0x3
>   
>
> No, there is a note “replace with 0x2 ^ ALPHA_OFFSET” to silence it. Didnt you suggest 0x2 / 0xA? :)
>
> While we can suggest as you wrote:
>  #define ALPHA_OFFSET 0x3
>
> I really dont think it is worth to do.


I don't see this as a false positive; I think Chromium should change their macro rather than Clang disable this check for everyone using macros.


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

https://reviews.llvm.org/D66397





More information about the cfe-commits mailing list