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

Module IntegerGuards

Provides classes and predicates for integer guards.

Import path

import semmle.code.java.dataflow.IntegerGuards

Imports

java

Provides all default Java QL imports.

Predicates

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.

integerGuard

An expression that directly tests whether a given expression is equal to k or not. The set of ks is restricted to those that are relevant for the expression or have a direct comparison with the expression.

Classes

IntComparableExpr

An expression for which the predicate integerGuard is relevant. This includes RValue and MethodAccess.