package
0.31.0
Repository: https://go.googlesource.com/tools
Documentation: pkg.go.dev

# Functions

New returns a new control-flow graph for the specified function body, which must be non-nil.

# Constants

function body BlockStmt.
body of ForStmt.
block after ForStmt.
head of ForStmt.
post condition of ForStmt.
block after IfStmt.
else block of IfStmt.
then block of IfStmt.
Stmt=nil.
labeled block of BranchStmt (Stmt may be nil for dangling label).
body of RangeStmt.
block after RangeStmt.
head of RangeStmt.
block after a CommClause.
body of SelectStmt.
block after SelectStmt.
body of CaseClause.
block after {Type.}SwitchStmt.
secondary expression of a multi-expression CaseClause.
unreachable block after {Branch,Return}Stmt / no-return call ExprStmt.

# Structs

A Block represents a basic block: a list of statements and expressions that are always evaluated sequentially.
A CFG represents the control-flow graph of a single function.

# Type aliases

A BlockKind identifies the purpose of a block.