CodeQL library for C/C++
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

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.