Module DataFlow

Import path

import semmle.code.cpp.dataflow.DataFlow

Predicates

definitionByReferenceNodeFromArgument

Gets the Node corresponding to a definition by reference of the variable that is passed as argument of a call.

exprNode

Gets the Node corresponding to e.

flowsTo

Holds if data can flow (inter-procedurally) from source to sink.

getAnAccessToAssignedVariable
localExprFlow

Holds if data can flow from e1 to e2 in zero or more local (intra-procedural) steps.

localFlow

Holds if data flows from source to sink in zero or more local (intra-procedural) steps.

localFlowStep

Holds if data flows from nodeFrom to nodeTo in exactly one local (intra-procedural) step.

parameterNode

Gets the Node corresponding to the value of p at function entry.

simpleLocalFlowStep

INTERNAL: do not use.

uninitializedNode

Gets the Node corresponding to the value of an uninitialized local variable v.

Classes

BarrierGuard

A guard that validates some expression.

Configuration

A configuration of interprocedural data flow analysis. This defines sources, sinks, and any other configurable aspect of the analysis. Each use of the global data flow library must define its own unique extension of this abstract class. To create a configuration, extend this class with a subclass whose characteristic predicate is a unique singleton string. For example, write

DefinitionByReferenceNode

A node that represents the value of a variable after a function call that may have changed the variable because it’s passed by reference.

ExplicitParameterNode

The value of a parameter at function entry, viewed as a node in a data flow graph.

ExprNode

An expression, viewed as a node in a data flow graph.

ImplicitParameterNode
Node

A node in a data flow graph.

ParameterNode
PartialPathNode

A Node augmented with a call context, an access path, and a configuration.

PathNode

A Node augmented with a call context (except for sinks), an access path, and a configuration. Only those PathNodes that are reachable from a source are generated.

PostUpdateNode

A node associated with an object after an operation that might have changed its state.

PreConstructorInitThis

INTERNAL: do not use.

PreObjectInitializerNode

INTERNAL: do not use.

RefParameterFinalValueNode

INTERNAL: do not use. The final value of a non-const ref parameter.

UninitializedNode

The value of an uninitialized local variable, viewed as a node in a data flow graph.

Modules

PartialPathGraph

Provides the query predicates needed to include a graph in a path-problem query.

PathGraph

Provides the query predicates needed to include a graph in a path-problem query.