Skip to content

Commit be39c4c

Browse files
committed
Shared: Minor precision improvement.
1 parent b308c54 commit be39c4c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

shared/controlflow/codeql/controlflow/ControlFlow.qll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ module Make<
349349
gv2.isIntRange(high, true) and
350350
result = mkRange(low, high)
351351
)
352+
or
353+
exists(int bound, boolean upper, int d |
354+
gv1.isIntRange(bound, upper) and
355+
gv2.getDualValue().asIntValue() = bound and
356+
result.asBase().isIntRange(bound + d, upper)
357+
|
358+
upper = true and d = -1
359+
or
360+
upper = false and d = 1
361+
)
352362
)
353363
}
354364

0 commit comments

Comments
 (0)