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

Module CppDataFlow

Import path

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

Imports

Predicates

exprNode

Gets the node corresponding to e.

Aliases

getAdditionalFlowIntoCallNodeTerm

Gets an additional term that is added to the join and branch computations to reflect an additional forward or backwards branching factor that is not taken into account when calculating the (virtual) dispatch cost.

getSecondLevelScope

Gets the second-level scope containing the node n, if any.

mayBenefitFromCallContext

Holds if the set of viable implementations that can be called by call might be improved by knowing the call context.

neverSkipInPathGraph
validParameterAliasStep

Holds if the data-flow step from node1 to node2 can be used to determine where side-effects may return from a callable. For C/C++, this means that the step from node1 to node2 not only preserves the value, but also preserves the identity of the value. For example, the assignment to x that reads the value of *p in cpp int* p = ... int x = *p; does not preserve the identity of *p.

viableImplInCallContext

Gets a viable dispatch target of call in the context ctx. This is restricted to those calls for which a context might make a difference.