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

Predicate definitionUsePair

Computed relation: A “definition-use-pair” for a particular variable. Intuitively, this means that def is an assignment to var, and use is a read of var at which the value assigned by def may be read. (There can be more than one definition reaching a single use, and a single definition can reach many uses.)

Import path

import cpp
predicate definitionUsePair(SemanticStackVariable var, Expr def, Expr use)