CodeQL library for C/C++
codeql/cpp-all 5.1.0 (changelog, source)
Search

Predicate comparesLt

Holds if left < right + k evaluates to isLt given that some guard evaluates to value.

To find the specific guard that performs the comparison use IRGuards.comparesLt.

Import path

import semmle.code.cpp.controlflow.IRGuards
predicate comparesLt(Operand left, Operand right, int k, boolean isLt, AbstractValue value)