update {cpp/js}/bitwise-sign-check to match java

This commit is contained in:
erik-krogh
2022-08-11 15:31:32 +02:00
parent cc41a83a8d
commit 39c1832995
2 changed files with 3 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
/**
* @name Sign check of bitwise operation
* @description Checking the sign of a bitwise operation often has surprising
* edge cases.
* @description Checking the sign of the result of a bitwise operation may yield unexpected results.
* @kind problem
* @problem.severity warning
* @precision high
@@ -26,4 +25,4 @@ where
forall(int op | op = lhs.(BitwiseAndExpr).getAnOperand().getValue().toInt() | op < 0) and
// exception for cases involving macros
not e.isAffectedByMacro()
select e, "Potential unsafe sign check of a bitwise operation."
select e, "Sign check of a bitwise operation."