[PATCH] D68694: Do not show "use of a signed integer operand with a binary bitwise operator" for positive integer operands

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 10:27:48 PDT 2019


aaron.ballman added a reviewer: aaron.ballman.
aaron.ballman added a comment.

> In my opinion this check should be disabled in case of integer literals, since there are a lot of existing code (even in system libraries) where user can do nothing, e.g.:

I think that this check should behave how the coding standard dictates it behaves. By my reading of HIC++, the check is behaving by design. I think there are a few ways forward though (not mutually exclusive):

0) See if the HIC++ folks are interested in clarifying their standard for integer literals and if they are, modify the check

1. Add an off-by-default option that suppresses the diagnostic with positive integer literals so that users can explicitly decide to deviate locally
2. Document that this happens and is expected behavior; users can disable the check if they don't wish to conform to that standard.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D68694





More information about the cfe-commits mailing list