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

Predicate DefUse::definitionReachesUse

Holds if a definition that overlaps useLocation at (defBlock, defRank) reaches the use of useLocation at (useBlock, useRank) without any intervening definitions that overlap useLocation.

Import path

import semmle.code.cpp.ir.implementation.aliased_ssa.internal.SSAConstruction
predicate definitionReachesUse(MemoryLocation useLocation, OldBlock defBlock, int defRank, OldBlock useBlock, int useRank)