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

Predicate FlowVar_internal::fullySupportedSsaVariable

For various reasons, not all variables handled perfectly by the SSA library. Ideally, this predicate should become larger as the SSA library improves. Before we can remove the BlockVar class completely, the SSA library needs the following improvements.

  • Considering uninitialized local variables to be definitions.
  • Supporting fields, globals and statics like the Java SSA library does.
  • Supporting all local variables, even if their address is taken by address-of, reference assignments, or lambdas.
  • Understanding that assignment to a field of a local struct is a definition of the struct but not a complete overwrite. This is what the IR library uses chi nodes for.

Import path

import semmle.code.cpp.dataflow.internal.FlowVar
predicate fullySupportedSsaVariable(Variable v)