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

Module VariableCapture

Provides logic related to captured variables.

Import path

import semmle.code.csharp.dataflow.internal.DataFlowPrivate

Predicates

clearsContent
flowInsensitiveStep

Holds if there is control-flow insensitive data-flow from node1 to node2 involving a captured variable. Only used in lambda flow.

getCapturedVariableContent
readStep
storeStep
valueStep

Classes

Aliases

CapturedVariable

A captured local scope variable. Includes captured this variables.

ClosureExpr

An expression constructing a closure that may capture one or more variables. This can for example be a lambda or a constructor call of a locally defined object.

Flow

Constructs the type ClosureNode and associated step relations, which are intended to be included in the data-flow node and step relations.