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

Predicate FlowVar_internal::assignmentLikeOperation

Holds if v is modified through va as a side effect of evaluating node, receiving a value best described by assignedExpr. Assignment-like operations are those that desugar to a non-overloaded = assignment: =, +=, ++, --, etc.

This corresponds to FlowVar::definedByExpr, except that the case where node instanceof Initializer is covered by initializer instead of this predicate.

Import path

import semmle.code.cpp.dataflow.internal.FlowVar
predicate assignmentLikeOperation(ControlFlowNode node, Variable v, Expr assignedExpr)