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

Module SourceVariableImpl

Import path

import semmle.code.csharp.dataflow.internal.SsaImpl

Predicates

getASameOutRefDefAfter

Gets an out/ref definition of the same source variable as the out/ref definition def, belonging to the same call, at a position after def.

isPlainFieldOrPropAccess

Holds if fpa is an access inside callable c of this-qualified or static field or property fp.

isQualifiedFieldOrPropAccess

Holds if fpa is an access inside callable c of instance field or property fp with qualifier q.

outRefExitRead

Holds if a pseudo read for ref or out variable v happens at index i in basic block bb. A pseudo read is inserted to make assignments to out/ref variables live, for example line 1 in

ownFieldOrPropAccess

Holds if fpa is an access to an instance field or property of this.

refReadBeforeWrite

Holds if a pseudo read for ref variable v happens at index i in basic block bb, just prior to an update of the referenced value. A pseudo read is inserted to make assignments to the ref variable live, for example line 2 in

trackFieldOrProp

Holds if fp is a field or a property that is interesting as a basis for SSA.

variableDefinition

Holds if the ith node of basic block bb is assignable definition ad targeting source variable v.

variableWriteDirect

Holds if the ith node of basic block bb is a (potential) write to source variable v. The Boolean certain indicates whether the write is certain.

Classes

FieldOrProp

A field or a property.

FieldOrPropAccess

An access to a field or a property.

FieldOrPropRead

An access to a field or a property that reads the underlying value.

InstanceFieldOrProp

An instance field or property.