Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39c1832

Browse files
committed
update {cpp/js}/bitwise-sign-check to match java
1 parent cc41a83 commit 39c1832

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

cpp/ql/src/Likely Bugs/Arithmetic/BitwiseSignCheck.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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
@@ -26,4 +25,4 @@ where
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."

javascript/ql/src/Expressions/BitwiseSignCheck.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ where
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."

0 commit comments

Comments
 (0)