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

Datatype Internal::TSsaDefinition

A data type representing SSA definitions.

We distinguish three kinds of SSA definitions:

  1. Variable definitions, including declarations, assignments and increments/decrements.
  2. Pseudo-definitions for captured variables at the beginning of the capturing function as well as after calls.
  3. Phi nodes.

SSA definitions are only introduced where necessary. In particular, unreachable code has no SSA definitions associated with it, and neither have dead assignments (that is, assignments whose value is never read).

Import path

import semmle.go.dataflow.SsaImpl

Known direct subtypes

Branch types

TCapture

An SSA definition representing the capturing of an SSA-convertible variable in the closure of a nested function.

TExplicitDef

An SSA definition that corresponds to an explicit assignment or other variable definition.

TPhi

An SSA phi node, that is, a pseudo-definition for a variable at a point in the flow graph where otherwise two or more definitions for the variable would be visible.

Injectors

TCapture

An SSA definition representing the capturing of an SSA-convertible variable in the closure of a nested function.

TExplicitDef

An SSA definition that corresponds to an explicit assignment or other variable definition.

TPhi

An SSA phi node, that is, a pseudo-definition for a variable at a point in the flow graph where otherwise two or more definitions for the variable would be visible.