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

Class BasicBlock

A basic block, that is, a maximal straight-line sequence of control flow nodes without branches or joins.

At the database level, a basic block is represented by its first control flow node.

Import path

import semmle.go.controlflow.BasicBlocks

Direct supertypes

Known direct subtypes

Predicates

getANode

Gets a node in this block.

getAPredecessor

Gets a basic block preceding this one.

getASuccessor

Gets a basic block succeeding this one.

getFirstNode

Gets the first node in this block.

getImmediateDominator

Gets the basic block that immediately dominates this basic block.

getLastNode

Gets the last node in this block.

getNode

Gets the node at the given position in this block.

getRoot

Gets the innermost function or file to which this basic block belongs.

hasLocationInfo

Holds if this basic block 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.

length

Gets the length of this block.

toString

Gets a textual representation of this basic block.

Charpred