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

Predicate DefUse::definitionReachesEndOfBlock

Holds if the definition that overlaps useLocation at (defBlock, defRank) reaches the end of block block without any intervening definitions that overlap useLocation.

Import path

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