================ @@ -0,0 +1,40 @@ +.. title:: clang-tidy - performance-bool-bitwise-operation + +performance-bool-bitwise-operation +================================== + +Finds potentially inefficient use of bitwise operators such as ``&``, +``|`` and their compound analogues on boolean values where logical +operators like ``&&`` and ``||`` would be more appropriate. Bitwise +operations on booleans can incur unnecessary performance overhead +due to implicit integer conversions and missed short-circuit evaluation. ---------------- vbvictor wrote:
Please place a newline after the first sentence. ```suggestion Finds potentially inefficient use of bitwise operators such as ``&``, ``|`` and their compound analogues on boolean values where logical operators like ``&&`` and ``||`` would be more appropriate. Bitwise operations on booleans can incur unnecessary performance overhead due to implicit integer conversions and missed short-circuit evaluation. ``` https://github.com/llvm/llvm-project/pull/142324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits