CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.15-dev (changelog, source)
Search

Class VarUse

A ControlFlowNode that uses (that is, reads from) a single variable.

Some variable definitions are also uses, notably the operands of update expressions.

Import path

import javascript

Direct supertypes

Indirect supertypes

Known direct subtypes

    Predicates

    getADef

    Gets a definition that may reach this use.

    getSsaVariable

    Gets the unique SSA variable this use refers to.

    getVariable

    Gets the variable this use refers to.

    Inherited predicates

    describeControlFlowNode

    For internal use.

    from ControlFlowNode
    getAPredecessor

    Gets a node preceding this node in the CFG.

    from ControlFlowNode
    getAPrimaryQlClass

    Gets the primary QL class for the Locatable.

    from Locatable
    getASuccessor

    Gets a node succeeding this node in the CFG.

    from ControlFlowNode
    getBasicBlock

    Gets the basic block this node belongs to.

    from ControlFlowNode
    getContainer

    Gets the function or toplevel to which this node belongs.

    from NodeInStmtContainer
    getEndLine

    Gets the line on which this element ends.

    from Locatable
    getFile

    Gets the file this program element comes from.

    from Locatable
    getLocation

    Gets this element’s location.

    from Locatable
    getNumLines

    Gets the number of lines covered by this element.

    from Locatable
    getPrimaryQlClasses

    Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs.

    from Locatable
    getStartLine

    Gets the line on which this element starts.

    from Locatable
    isAFinalNode

    Holds if this is a final node, that is, a CFG node where execution of a toplevel or function terminates.

    from ControlFlowNode
    isAFinalNodeOfContainer

    Holds if this is a final node of container, that is, a CFG node where execution of that toplevel or function terminates.

    from ControlFlowNode
    isBranch

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

    from ControlFlowNode
    isJoin

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

    from ControlFlowNode
    isStart

    Holds if this is a start node, that is, the CFG node where execution of a toplevel or function begins.

    from ControlFlowNode
    isUnreachable

    Holds if this node is unreachable, that is, it has no predecessors in the CFG. Entry nodes are always considered reachable.

    from ControlFlowNode
    toString

    Gets a textual representation of this element.

    from Locatable