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

Predicate Make::lastRefRedefExt

NB: If this predicate is exposed, it should be cached.

Holds if the node at index i in bb is a last reference to SSA definition def. The reference is last because it can reach another write next, without passing through another read or write.

The path from node i in bb to next goes via basic block input, which is either a predecessor of the basic block of next, or input = bb in case next occurs in basic block bb.

Import path

import codeql.ssa.Ssa
predicate lastRefRedefExt(DefinitionExt def, SourceVariable v, BasicBlock bb, int i, BasicBlock input, DefinitionExt next)