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

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 10 02:13:00 PDT 2019


JonasToth added a comment.

In D68694#1701772 <https://reviews.llvm.org/D68694#1701772>, @aaron.ballman wrote:

> > 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.


Hey :)
I would personally prefer option 1. My biggest wish is to have time to come back to development in a few weeks (but not guaranteed :/) then I would iterate the check a bit to make it more userfriendly as well!

Best, Jonas


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