CodeQL library for C/C++
codeql/cpp-all 0.12.7-dev (changelog, source)

Predicate SimpleRangeAnalysisCached::lowerBound

Gets the lower bound of the expression.

Note: expressions in C/C++ are often implicitly or explicitly cast to a different result type. Such casts can cause the value of the expression to overflow or to be truncated. This predicate computes the lower bound of the expression without including the effect of the casts. To compute the lower bound of the expression after all the casts have been applied, call lowerBound like this:


Import path

import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
float lowerBound(Expr expr)