File tree Expand file tree Collapse file tree
cpp/ql/src/Likely Bugs/Arithmetic
javascript/ql/src/Expressions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/**
22 * @name Sign check of bitwise operation
3- * @description Checking the sign of a bitwise operation often has surprising
4- * edge cases.
3+ * @description Checking the sign of the result of a bitwise operation may yield unexpected results.
54 * @kind problem
65 * @problem.severity warning
76 * @precision high
2625 forall ( int op | op = lhs .( BitwiseAndExpr ) .getAnOperand ( ) .getValue ( ) .toInt ( ) | op < 0 ) and
2726 // exception for cases involving macros
2827 not e .isAffectedByMacro ( )
29- select e , "Potential unsafe sign check of a bitwise operation."
28+ select e , "Sign check of a bitwise operation."
Original file line number Diff line number Diff line change 5353 not e instanceof EqualityTest and
5454 e .getRightOperand ( ) .getIntValue ( ) = 0 and
5555 not acceptableSignCheck ( b )
56- select e , "Sign check of a bitwise operation"
56+ select e , "Sign check of a bitwise operation. "
You can’t perform that action at this time.
0 commit comments