Pointless bitwise expression

Last modified: 03 December 2024

Reports pointless bitwise expressions.

Such expressions include applying the & operator to the maximum value for the given type, applying the or operator to zero, and shifting by zero. Such expressions may be the result of automated refactorings not followed through to completion and are unlikely to be originally intended.

Examples: