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

Predicate nonNanGuardedVariable

Holds if in the branch branch of a guard guard involving v, we know that v is not NaN, and therefore it is safe to make range inferences about v.

Import path

import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
predicate nonNanGuardedVariable(Expr guard, VariableAccess v, boolean branch)