CodeQL library for C/C++
codeql/cpp-all 0.12.12-dev (changelog, source)
Search

Module DataFlowPrivate

DEPRECATED: Use semmle.code.cpp.dataflow.new.DataFlow instead.

Import path

import semmle.code.cpp.dataflow.internal.DataFlowPrivate

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.

clearsContent

Holds if values stored inside content c are cleared at node n.

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.

getAnOutNode

Gets a node that can read the value returned from call with return kind kind.

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.

isParameterNode

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

isUnreachableInCall
jumpStep

Holds if data can flow from node1 to node2 in a way that loses the calling context. For example, this would happen with flow through a global or static variable.

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
nodeGetEnclosingCallable

Gets the callable in which this node occurs.

nodeIsHidden

Holds if n should be hidden from path explanations.

ppReprType

Gets a string representation of a type returned by getNodeType.

readStep

Holds if data can flow from node1 to node2 via a read of f. Thus, node1 references an object with a field f whose value ends up in node2.

storeStep

Holds if data can flow from node1 to node2 via an assignment to f. Thus, node2 references an object with a field f that contains the value of node1.

typeStrongerThan

Classes

ArgumentNode

A data flow node that occurs as the argument of a call and is passed as-is to the callable. Arguments that are wrapped in an implicit varargs array creation are not included, but the implicitly created array is. Instance arguments are also included.

CastNode

A node that performs a type cast.

DataFlowCall

A function call relevant for data flow.

OutNode

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

ReturnKind

A return kind. A return kind describes how a value can be returned from a callable. For C++, this is simply a function return.

ReturnNode

A data flow node that represents a returned value in the called function.

Aliases

ContentApprox

An approximated Content.

DataFlowCallable

A C/C++ function [N4140 8.3.5]. Both member functions and non-member functions are included. For example the function MyFunction in: void MyFunction() { DoSomething(); }

DataFlowExpr

A C/C++ expression.

DataFlowSecondLevelScope

The trivial type with a single element.

DataFlowType

A C/C++ type.

LambdaCallKind

The trivial type with a single element.