CodeQL library for Java/Kotlin
codeql/java-all 0.8.12 (changelog, source)
Search

Predicate intBoundGuard

A guard that splits the values of a variable into one range with an upper bound of k-1 and one with a lower bound of k.

If branch_with_lower_bound_k is true then result is equivalent to k <= x and if it is false then result is equivalent to k > x.

Import path

import semmle.code.java.dataflow.IntegerGuards
Expr intBoundGuard(VarRead x, boolean branch_with_lower_bound_k, int k)