CodeQL library for Swift
codeql/swift-all 6.3.2 (changelog, source)
Search

Class CfgNode

A node for an AST node.

Each AST node maps to zero or more CfgNodes: zero when the node is unreachable (dead) code or not important for control flow, and multiple when there are different splits for the AST node.

Import path

import codeql.swift.controlflow.CfgNodes

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getASplit

Gets a split for this control flow node, if any.

getAst

Gets the AST representation of this control flow node, if any.

getNode

Gets the AST node that this node corresponds to, if any.

getSplitsString

Gets a comma-separated list of strings for each split in this node, if any.

Inherited predicates

getAPredecessor

Gets an immediate predecessor, if any.

from ControlFlowNode
getAPredecessor

Gets an immediate predecessor node of a given flow type, if any.

from ControlFlowNode
getASuccessor

Gets an immediate successor, if any.

from ControlFlowNode
getASuccessor

Gets a successor node of a given type, if any.

from ControlFlowNode
getAstNode

Gets the AST node that this node corresponds to, if any.

from NodeImpl
getBasicBlock

Gets the basic block that this control flow node belongs to.

from ControlFlowNode
getEnclosingCallable

Gets the enclosing callable of this node.

from NodeImpl
getFile

Gets the file of this control flow node.

from ControlFlowNode
getLocation

Gets the location of this control flow node.

from NodeImpl
getScope

Gets the scope of this node.

from ControlFlowNode
isBranch

Holds if this node has more than one successor.

from ControlFlowNode
isCondition

Holds if this control flow node has conditional successors.

from ControlFlowNode
isJoin

Holds if this node has more than one predecessor.

from ControlFlowNode
toString

Gets a textual representation of this control flow node.

from NodeImpl