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

Class SsaVariableCapture

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

Capturing definitions appear at the beginning of such functions, as well as at any function call that may affect the value of the variable.

Import path

import semmle.go.dataflow.SSA

Direct supertypes

Indirect supertypes

Predicates

definesAt

INTERNAL: Use getBasicBlock() and getSourceVariable() instead.

getBasicBlock

Gets the basic block to which this definition belongs.

getKind

INTERNAL: Do not use.

getLocation

Gets the source location for this element.

getSourceVariable

Gets the source variable defined by this definition.

prettyPrintDef

INTERNAL: Use toString() instead.

Inherited predicates

getRoot

Gets the innermost function or file to which this SSA definition belongs.

from SsaDefinition
getVariable

Gets the SSA variable defined by this definition.

from SsaDefinition
hasLocationInfo

DEPRECATED: Use getLocation() instead.

from SsaDefinition
prettyPrintRef

INTERNAL: Do not use.

from SsaImplicitDefinition
toString

Gets a textual representation of this element.

from SsaDefinition