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

Class ControlFlow::WriteNode

A control-flow node that initializes or updates the value of a constant, a variable, a field, or an (array, slice, or map) element.

Import path

import semmle.go.controlflow.ControlFlowGraph

Direct supertypes

Indirect supertypes

Known direct subtypes

    Predicates

    definesSsaVariable

    Holds if this node defines SSA variable v to be rhs.

    getLhs

    Gets the left-hand side of this write.

    getRhs

    Gets the right-hand side of this write.

    writes

    Holds if this node sets variable or constant v to rhs.

    writesComponent

    Holds if this node sets any field or element of base to rhs.

    writesElement

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

    writesField

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

    Inherited predicates

    dominatesNode

    Holds if this node dominates dominee in the control-flow graph.

    from Node
    getAPredecessor

    Gets a node that directly precedes this one in the control-flow graph.

    from Node
    getASuccessor

    Gets a node that directly follows this one in the control-flow graph.

    from Node
    getBasicBlock

    Gets the basic block to which this node belongs.

    from Node
    getFile

    Gets the file to which this node belongs.

    from Node
    getRoot

    Gets the innermost function or file to which this node belongs.

    from Node
    hasLocationInfo

    Holds if this element is at the specified location. The location spans column startcolumn of line startline to column endcolumn of line endline in file filepath. For more information, see Locations.

    from Node
    isBranch

    Holds if this is a node with more than one successor.

    from Node
    isEntryNode

    Holds if this node is the (unique) entry node of a function or file.

    from Node
    isExitNode

    Holds if this node is the (unique) exit node of a function or file.

    from Node
    isFirstNodeOf

    Holds if this is the first control-flow node in subtree.

    from Node
    isJoin

    Holds if this is a node with more than one predecessor.

    from Node
    toString

    Gets a textual representation of this control flow node.

    from Node