[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 12:22:27 PDT 2019
rsmith added a comment.
The `ALPHA_OFFSET` code seems to be unnecessarily "clever" to me. I think the warning can be suppressed by reversing the operands:
`ALPHA_OFFSET ^ 2`
But if I were maintaining that code I would get rid of the xor hack entirely and use
#define CHANNEL_OFFSET(i) (i)
or
#define CHANNEL_OFFSET(i) (3-(i))
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66397/new/
https://reviews.llvm.org/D66397
More information about the cfe-commits
mailing list