CodeQL library for C/C++
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)