[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 09:49:13 PDT 2019


aaron.ballman added a comment.

In D63423#1550586 <https://reviews.llvm.org/D63423#1550586>, @xbolva00 wrote:

> ... But I go thru codesearch and this is just one case I think.
>
> I think we should warn in macros... In codesearch case ,they are many more true positives, then false negatives.
>
>   #define MAX_T_U32 ((2^32)-1)
>
>
> Ouch.


That's my rationale as well. If it happens outside of macros and is bad, it's probably just as likely to happen within a macro and be equally as bad. I think we probably should warn within macros.


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

https://reviews.llvm.org/D63423





More information about the cfe-commits mailing list