File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
cpp/ql/src/Likely Bugs/Likely Typos Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,11 @@ predicate illDefinedDecrForStmt(
5050 DataFlow:: localFlowStep ( DataFlow:: exprNode ( initialCondition ) , DataFlow:: exprNode ( lesserOperand ) ) and
5151 // `initialCondition` < `terminalCondition`
5252 (
53+ upperBound ( initialCondition ) < lowerBound ( terminalCondition ) and
5354 (
54- upperBound ( initialCondition ) < lowerBound ( terminalCondition ) and (
55- // exclude cases where the loop counter is `unsigned` (where wrapping behaviour can be used deliberately)
56- v .getUnspecifiedType ( ) .( IntegralType ) .isSigned ( ) or
57- initialCondition .getValue ( ) .toInt ( ) = 0
58- )
55+ // exclude cases where the loop counter is `unsigned` (where wrapping behaviour can be used deliberately)
56+ v .getUnspecifiedType ( ) .( IntegralType ) .isSigned ( ) or
57+ initialCondition .getValue ( ) .toInt ( ) = 0
5958 )
6059 or
6160 ( forstmt .conditionAlwaysFalse ( ) or forstmt .conditionAlwaysTrue ( ) )
You can’t perform that action at this time.
0 commit comments