CodeQL library for C/C++
codeql/cpp-all 8.0.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.

Predicates

comparesEq

Holds if left = right + k evaluates to isLt given that some guard evaluates to value.

comparesLt

Holds if left < right + k evaluates to isLt given that some guard evaluates to value.

Classes

AbstractValue

DEPRECATED: Use GuardValue instead.

BooleanValue

DEPRECATED: Use GuardValue instead.

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 guard. This may be any expression whose value determines subsequent control flow. It may also be a switch case, which as a guard is considered to evaluate to either true or false depending on whether the case matches.

MatchValue

DEPRECATED: Use GuardValue instead.

Modules

GuardsInput

INTERNAL: Do not use.

Aliases

Cpp

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

GuardValue

An abstract value that a Guard may evaluate to.

Guards_v1

INTERNAL: Don’t use.