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

Class SsaSourceVariable

A variable that can be SSA converted, that is, a local variable, but not a variable declared in file scope.

Import path

import semmle.go.dataflow.SSA

Direct supertypes

Indirect supertypes

Predicates

mayHaveIndirectReferences

Holds if there may be indirect references of this variable that are not covered by getAReference().

Inherited predicates

getARead

Gets a data-flow node that reads the value of this entity.

from ValueEntity
getAReference

Gets a reference to this entity.

from Entity
getAWrite

Gets a control-flow node that updates the value of this entity.

from ValueEntity
getDeclaration

Gets the declaring identifier for this entity, if any.

from Entity
getDeclaringFunction

Gets the innermost function containing the scope of this variable, if any.

from LocalVariable
getInit

Gets the expression to which this entity is initialized, if any.

from DeclaredEntity
getName

Gets the name of this entity.

from Entity
getPackage

Gets the package in which this entity is declared, if any.

from Entity
getQualifiedName

Gets the qualified name of this entity, if any.

from Entity
getScope

Gets the scope in which this entity is declared, if any.

from Entity
getSpec

Gets the declaration specifier declaring this variable.

from DeclaredVariable
getType

Gets the type of this entity.

from Entity
hasLocationInfo

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

from Entity
hasQualifiedName

Holds if this entity is declared in a package with path pkg and has the given name.

from Entity
isCaptured

Holds if this variable is referenced inside a nested function.

from LocalVariable
toString

Gets a textual representation of this entity.

from Entity

Charpred