[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)
Denis Mikhailov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 6 04:23:45 PDT 2025
denzor200 wrote:
> Personally I don't think this is a `performance` check. Boolean operators are for bools; bitwise operators are for ints. I would put this in `readability` or `misc` instead.
I've put this in the performance section because evaluating only one operand(which will be in most cases) takes less time than evaluating both operands.
I think no place for this check in readability section - someone might say that `a &= b;` has better readabilitiness than `a = a && b;`
https://github.com/llvm/llvm-project/pull/142324
More information about the cfe-commits
mailing list