CodeQL library for Python
codeql/python-all 5.0.4-dev (changelog, source)
Search

Class ControlFlowNode

A control flow node. Control flow nodes have a many-to-one relation with syntactic nodes, although most syntactic nodes have only one corresponding control flow node. Edges between control flow nodes include exceptional as well as normal control flow.

Import path

import python

Direct supertypes

Known direct subtypes

Predicates

dominates

Whether this dominates other. Note that all nodes dominate themselves.

getAChild
getAFalseSuccessor

Gets a successor for this node if the relevant condition is False.

getANormalSuccessor

Gets a successor for this node if no exception is raised.

getAPredecessor

Gets a predecessor of this flow node

getASuccessor

Gets a successor of this flow node

getATrueSuccessor

Gets a successor for this node if the relevant condition is True.

getAnExceptionalSuccessor

Gets a successor for this node if an exception is raised.

getBasicBlock

Gets the basic block containing this flow node

getEnclosingModule

Gets the enclosing module

getImmediateDominator

Gets the immediate dominator of this flow node

getLocation

Gets the location of this ControlFlowNode

getNode

Gets the syntactic element corresponding to this flow node

getScope

Gets the scope containing this flow node

isAttribute

Whether this flow node corresponds to an attribute expression

isAugLoad

Whether this control flow node is a load in an augmented assignment

isAugStore

Whether this control flow node is a store in an augmented assignment

isBranch

Holds if this CFG node is a branch

isCall

Whether this flow node corresponds to a call

isClass

Whether this flow node corresponds to a class definition expression

isDelete

Whether this control flow node is a delete

isEntryNode

Whether this flow node is the first in its scope

isExceptionalExit

Whether the scope may be exited as a result of this node raising an exception

isFunction

Whether this flow node corresponds to a function definition expression

isIfExp

Whether this flow node corresponds to a conditional expression

isImport

Whether this flow node corresponds to an import

isImportMember

Whether this flow node corresponds to an import member

isLiteral

Whether this flow node corresponds to a literal

isLoad

Whether this control flow node is a load (including those in augmented assignments)

isModuleEntry

Whether this flow node is the first in a module

isNormalExit

Whether this node is a normal (non-exceptional) exit

isParameter

Whether this control flow node is a parameter

isStore

Whether this control flow node is a store (including those in augmented assignments)

isSubscript

Whether this flow node corresponds to an subscript expression

strictlyDominates

Whether this strictly dominates other.

strictlyReaches

Whether this strictly reaches other.

toString

Gets a textual representation of this element.

unlikelyReachable

Whether it is unlikely that this ControlFlowNode can be reached