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

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 11:00:07 PDT 2021


hvdijk added a comment.

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

>>> Perhaps that should warn even if the RHS is in hex form
>
> It would be kinda strange, since in one clang release we ask users to silence warning with hex form and newer release would warn anyway. Not a fan of this decision.

Fair point, but the clang suggestion is always to turn the LHS into hex form, never to turn the RHS in hex form, so if users followed clang's suggested silencing, it would continue to work. That's how I didn't even notice that I could change the RHS to hex form in the case I asked about.

And fully agreed that if we warn about any cases where we didn't warn before, we need to be very careful about the risk of false positives. When I create the new RFC patch, I'll try to get details on that and include it in the description.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63423



More information about the llvm-commits mailing list