CodeQL library for Go
codeql/go-all 7.2.2 (changelog, source)
Search

Predicate adjacentUseUse

NB: This predicate should be cached.

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 except for phi nodes and uncertain implicit updates.

Import path

import semmle.go.dataflow.SsaImpl
predicate adjacentUseUse(Instruction use1, Instruction use2)