CodeQL library for C/C++
Search

Module DataFlowUtil

Provides C++-specific definitions for use in the data flow library.

Import path

import semmle.code.cpp.dataflow.internal.DataFlowUtil

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 the value of evaluating e. For data flowing out of an expression, like when an argument is passed by reference, use definitionByReferenceNodeFromArgument instead.

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.

Content

A description of the way data may be stored inside an object. Examples include instance fields, the contents of a collection object, or the contents of an array.

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.

DefinitionByReferenceOrIteratorNode

INTERNAL: do not use.

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.

FieldContent

A reference through an instance field.

ImplicitParameterNode
Node

A node in a data flow graph.

ParameterNode
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.