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(
50
50
DataFlow:: localFlowStep ( DataFlow:: exprNode ( initialCondition ) , DataFlow:: exprNode ( lesserOperand ) ) and
51
51
// `initialCondition` < `terminalCondition`
52
52
(
53
+ upperBound ( initialCondition ) < lowerBound ( terminalCondition ) and
53
54
(
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
59
58
)
60
59
or
61
60
( forstmt .conditionAlwaysFalse ( ) or forstmt .conditionAlwaysTrue ( ) )
You can’t perform that action at this time.
0 commit comments