CodeQL library for Swift
codeql/swift-all 6.8.7 (changelog, source)
Search

Module DataFlowPrivate

Import path

import codeql.swift.dataflow.internal.DataFlowPrivate

Imports

ArgumentNodes
Cached

A collection of cached types and predicates to be evaluated in the same stage.

OutNodes
ParameterNodes
ReturnNodes

Predicates

additionalLambdaFlowStep

Extra data-flow steps needed for lambda flow analysis.

allowParameterReturnInSelf

Holds if flow is allowed to pass from parameter p and back to itself as a side-effect, resulting in a summary from p to itself.

captureValueStep
clearsContent

Holds if values stored inside content c are cleared at node n. For example, any value stored inside f is cleared at the pre-update node associated with x in x.f = newValue.

compatibleTypes

Holds if t1 and t2 are compatible, that is, whether data can flow from a node of type t1 to a node of type t2.

expectsContent

Holds if the value that is being tracked is expected to be stored inside content c at node n.

forceHighPrecision

Holds if access paths with c at their head always should be tracked at high precision. This disables adaptive access path precision for such access paths.

getContentApprox

Gets an approximated value for content c.

getNodeType

Gets the type of n used for type pruning.

isArgumentNode

Holds if arg is an ArgumentNode of c with position pos.

isLValue
isParameterNode

Holds if p is a ParameterNode of c with position pos.

isUnreachableInCall

Holds if the nodes in nr are unreachable when the call context is call.

jumpStep
knownSinkModel
knownSourceModel
lambdaCall

Holds if call is a lambda call of kind kind where receiver is the lambda expression.

lambdaCreation

Holds if creation is an expression that creates a lambda of kind kind for c.

localMustFlowStep
modifiableParam
nodeGetEnclosingCallable

Gets the callable in which this node occurs.

nodeIsHidden

Holds if n should be hidden from path explanations.

readStep
storeStep
typeStrongerThan

Classes

ArgumentNode

A data-flow node that represents a call argument.

CastNode

A node that performs a type cast.

DataFlowType
FlowSummaryNode

A data-flow node used to model flow summaries.

KeyPathParameterPostUpdateNode
KeyPathReturnPostUpdateNode
NodeImpl
NodeRegion
OutNode

A data-flow node that represents the output of a call.

PostUpdateNodeImpl
ReturnNode

A data-flow node that represents a value returned by a callable.

Datatypes

Aliases

CaptureFlow

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

CapturedParameter

A parameter that is captured in a closure.

CapturedVariable

A variable that is captured in a closure.

ContentApprox

An approximated Content.

DataFlowExpr

The base class for all expressions in Swift.

DataFlowSecondLevelScope

The trivial type with a single element.