CodeQL library for C#
codeql/csharp-all 3.1.1 (changelog, source)
Search

Class AssignableDefinitions::TupleAssignmentDefinition

A tuple definition by direct assignment, for example the definition of x in (x, y) = (0, 1).

Import path

import csharp

Direct supertypes

Indirect supertypes

Fields

Predicates

getAssignment

Gets the underlying assignment.

getEvaluationOrder

Gets the evaluation order of this definition among the other definitions in the compound tuple assignment. For example, in (x, (y, z)) = ... the orders of the definitions of x, y, and z are 0, 1, and 2, respectively.

getLeaf

Gets the leaf expression.

getSource

Gets the assigned expression, if any. For example, the expression assigned in x = 0 is 0. The value may not always exists, for example in assignments via out/ref parameters.

toString

Gets a textual representation of this assignable definition.

Inherited predicates

getAControlFlowNode

DEPRECATED: Use this.getExpr().getAControlFlowNode() instead.

from AssignableDefinition
getAFirstRead

Gets a first read of the same underlying assignable. That is, a read that can be reached from this definition without passing through any other reads, and which is guaranteed to read the value assigned in this definition. Example:

from AssignableDefinition
getElement

Gets the underlying element associated with this definition. This is either an expression or a parameter.

from AssignableDefinition
getEnclosingCallable

Gets the enclosing callable of this definition.

from AssignableDefinition
getExpr

Gets the underlying expression that updates the targeted assignable when reached, if any.

from AssignableDefinition
getLocation

Gets the location of this assignable definition.

from AssignableDefinition
getTarget

Gets the assignable being defined.

from AssignableDefinition
getTargetAccess

Gets the access used in the definition of the underlying assignable, if any. Local variable declarations and implicit parameter definitions are the only definitions without associated accesses.

from AssignableDefinition
isCertain

Holds if this definition is guaranteed to update the targeted assignable. The only potentially uncertain definitions are ref assignments.

from AssignableDefinition

Charpred