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

Module SSAUtils

Provides classes and predicates for use in the SSA library.

Import path

import semmle.code.cpp.controlflow.SSAUtils

Imports

Dominance

Provides dominance predicates for control-flow nodes.

RangeSSA

This library is a clone of semmle.code.cpp.controlflow.SSA, with only one difference: extra phi definitions are added after guards. For example: x = f(); if (x < 10) { // Block 1 ... } else { // Block 2 ... } In standard SSA, basic blocks 1 and 2 do not need phi definitions for x, because they are dominated by the definition of x on the first line. In RangeSSA, however, we add phi definitions for x at the beginning of blocks 1 and 2. This is useful for range analysis because it enables us to deduce a more accurate range for x in the two branches of the if-statement.

SSA

Provides classes and predicates for SSA representation (Static Single Assignment form).

cpp

Provides classes and predicates for working with C/C++ code.

Predicates

var_definition

Extended version of definition that also includes parameters.

Classes

SsaHelper

Common SSA logic for standard SSA and range-analysis SSA.