CodeQL library for Python
codeql/python-all 3.0.1-dev (changelog, source)
Search

Predicate SsaComputeImpl::AdjacentUsesImpl::adjacentUseUseSameVar

Holds if use1 and use2 form an adjacent use-use-pair of the same SSA variable, that is, the value read in use1 can reach use2 without passing through any other use or any SSA definition of the variable.

Import path

import semmle.python.essa.SsaCompute
predicate adjacentUseUseSameVar(ControlFlowNode use1, ControlFlowNode use2)