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

Module IRGuards

Provides classes and predicates for reasoning about guards and the control flow elements controlled by those guards.

Import path

import semmle.code.cpp.controlflow.IRGuards

Imports

IR

Provides classes that describe the Intermediate Representation (IR) of the program.

cpp

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

Classes

AbstractValue

An abstract value. This is either a boolean value, or a switch case.

BooleanValue

A Boolean value.

GuardCondition

A Boolean condition in the AST that guards one or more basic blocks. This includes operands of logical operators but not switch statements.

IRGuardCondition

A Boolean condition in the IR that guards one or more basic blocks. This includes operands of logical operators but not switch statements. Note that && and || don’t have an explicit representation in the IR, and therefore will not appear as IRGuardConditions.

MatchValue

A value that represents a match against a specific switch case.