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

Module DataFlowUtil

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

Import path

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

Imports

Predicates

conversionFlow

Holds if opFrom is an operand whose value flows to the result of instrTo.

convertedExprNode

Gets the Node corresponding to the value of evaluating e. Here, e may be a Conversion. For data flowing out of an expression, like when an argument is passed by reference, use definitionByReferenceNodeFromArgument instead.

definitionByReferenceNodeFromArgument

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

exprNode

Gets the Node corresponding to the value of evaluating e or any of its conversions. There is no result if e is a Conversion. For data flowing out of an expression, like when an argument is passed by reference, use definitionByReferenceNodeFromArgument instead.

exprNodeShouldBeInstruction

Holds if node should be an instruction node that maps node.asExpr() to e.

exprNodeShouldBeOperand

Holds if node is an OperandNode that should map node.asExpr() to e.

getTypeImpl

INTERNAL: Do not use.

hasInstructionAndIndex
hasOperandAndIndex
indirectExprNodeShouldBeIndirectInstruction

Holds if node should be an IndirectInstruction that maps node.asIndirectExpr() to e.

instructionNode

Gets the node corresponding to instr.

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.

localInstructionFlow

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

operandNode

Gets the node corresponding to operand.

parameterNode

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

stripPointer

INTERNAL: Do not use.

uninitializedNode

DEPRECATED: See UninitializedNode.

variableNode

Gets the VariableNode corresponding to the variable v.

Classes

AdditionalCallTarget

A unit class for adding additional call steps.

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.

ContentSet

An entity that represents a set of Contents.

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.

DirectParameterNode

An explicit positional parameter, including this, but not ....

ExprNode

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

FieldAddress

An operand that is defined by a FieldAddressInstruction.

FieldContent

A reference through a non-union instance field.

FinalGlobalValue

INTERNAL: do not use.

FinalParameterNode

INTERNAL: do not use.

IndirectArgumentOutNode

INTERNAL: do not use.

IndirectExprNode

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

IndirectParameterNode

INTERNAL: do not use.

IndirectReturnNode

INTERNAL: do not use.

IndirectReturnOutNode

INTERNAL: do not use.

InitialGlobalValue

INTERNAL: do not use.

InstructionNode

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

Node

A node in a data flow graph.

OperandNode

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

ParameterIndirectionNode

A synthetic parameter to model the pointed-to object of a pointer parameter.

ParameterNode

The value of a parameter at function entry, viewed as a node in a data flow graph. This includes both explicit parameters such as x in f(x) and implicit parameters such as this in x.f().

PostFieldUpdateNode

INTERNAL: do not use.

PostUpdateNode

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

PostUpdateNodeImpl

INTERNAL: Do not use.

SideEffectOperandNode

INTERNAL: do not use.

SsaPhiNode

INTERNAL: do not use.

ThisParameterNode

An implicit this parameter.

UninitializedNode

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

UnionContent

A reference through an instance field of a union.

VariableNode

A Node corresponding to a global (or static local) variable in the program, as opposed to the value of that variable at some particular point. This is used to model flow through global variables (and static local variables).

Modules

BarrierGuard

Provides a set of barrier nodes for a guard that validates an expression.

ExprFlowCached

INTERNAL: Do not use.

InstructionBarrierGuard

Provides a set of barrier nodes for a guard that validates an instruction.

Predicate signatures

guardChecksSig

Holds if the guard g validates the expression e upon evaluating to branch.

instructionGuardChecksSig

Holds if the guard g validates the instruction instr upon evaluating to branch.

Aliases

IndirectInstructionToIndirectExpr

A module that implements the logic for deciding whether an indirect node should be an IndirectExprNode.

IndirectOperandToIndirectExpr

A module that implements the logic for deciding whether an indirect node should be an IndirectExprNode.