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

Member predicate ControlFlow::WriteNode::writesElement

Holds if this node sets the value of element index on base (or its implicit dereference) to rhs.

For example, for the assignment xs[i] = v, base is either the data-flow node corresponding to xs or (if xs is a pointer) the data-flow node corresponding to the implicit dereference *xs, index is the data-flow node corresponding to i, and rhs is the data-flow node corresponding to base.

predicate writesElement(Node base, Node index, Node rhs)