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

Predicate adjacentDefRead

Holds if there is a definition or access at index i1 in basic block bb1 and the next subsequent read is at index i2 in basic block bb2.

Import path

import semmle.code.cpp.ir.dataflow.internal.SsaInternals
predicate adjacentDefRead(IRBlock bb1, int i1, SourceVariable sv, IRBlock bb2, int i2)