CodeQL library for C#
codeql/csharp-all 2.0.1-dev (changelog, source)
Search

Class ControlFlow::Node

A control flow node.

Either a callable entry node (EntryNode), a callable exit node (ExitNode), or a control flow node for a control flow element, that is, an expression or a statement (ElementNode).

A control flow node is a node in the control flow graph (CFG). There is a many-to-one relationship between ElementNodes and ControlFlowElements. This allows control flow splitting, for example modeling the control flow through finally blocks.

Only nodes that can be reached from the callable entry point are included in the CFG.

Import path

import csharp

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

dominates

Holds if this node dominates that node.

getAFalseSuccessor

Gets an immediate false successor, if any.

getAPredecessor

Gets an immediate predecessor, if any.

getAPredecessorByType

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

getASuccessor

Gets an immediate successor, if any.

getASuccessorByType

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

getATrueSuccessor

Gets an immediate true successor, if any.

getAstNode

Gets the control flow element that this node corresponds to, if any.

getBasicBlock

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

getElement

DEPRECATED: Use getAstNode instead.

getEnclosingCallable

Gets the enclosing callable of this control flow node.

postDominates

Holds if this node post-dominates that node.

strictlyDominates

Holds if this node strictly dominates that node.

strictlyPostDominates

Holds if this node strictly post-dominates that node.

Inherited predicates

getAPredecessor

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

from NodeImpl
getASuccessor

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

from NodeImpl
getLocation

Gets the location of this control flow node.

from NodeImpl
getScope

Gets the scope of this node.

from NodeImpl
isBranch

Holds if this node has more than one successor.

from NodeImpl
isCondition

Holds if this control flow node has conditional successors.

from NodeImpl
isJoin

Holds if this node has more than one predecessor.

from NodeImpl
toString

Gets a textual representation of this control flow node.

from NodeImpl