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

Member predicate Public::ReadNode::readsElement

Holds if this data-flow node reads the value of element index on the value of base or its implicit dereference.

For example, for the element read xs[i], 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, and index is the data-flow node corresponding to i.

predicate readsElement(Node base, Node index)