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

Predicate useOfVarActual

Same as useOfVar(v, use), but with the extra condition that the access use actually reads the value of the stack variable v at run-time. (Non-examples include &x and function calls where the callee does not use the relevant parameter.)

Import path

import cpp
predicate useOfVarActual(SemanticStackVariable v, VariableAccess use)