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

Module IRVariable

Provides classes that represent variables accessed by the IR.

Import path

import semmle.code.cpp.ir.implementation.unaliased_ssa.IRVariable

Imports

IRFunction

Provides the class IRFunction, which represents the Intermediate Representation for the definition of a function.

TempVariableTag

Defines the public interface to temporary variable tags, which describe the reason a particular IRTempVariable was generated.

Classes

IRAutomaticUserVariable

A user-declared variable that is allocated on the stack. This includes all parameters and non-static local variables.

IRAutomaticVariable

A variable (user-declared or temporary) that is allocated on the stack. This includes all parameters, non-static local variables, and temporary variables.

IRDynamicInitializationFlag

A variable generated to track whether a specific non-stack variable has been initialized. This is used to model the runtime initialization of static local variables in C++, as well as static fields in C#.

IREllipsisVariable

A temporary variable generated to hold the contents of all arguments passed to the ... of a function that accepts a variable number of arguments.

IRGeneratedVariable

A variable that is not user-declared. This includes temporary variables generated as part of IR construction, as well as string literals.

IRParameter

An IR variable which acts like a function parameter, including positional parameters and the temporary variables generated for this and ellipsis parameters.

IRPositionalParameter

An IR variable representing a positional parameter.

IRReturnVariable

A temporary variable generated to hold the return value of a function.

IRStaticUserVariable

A user-declared variable that is not allocated on the stack. This includes all global variables, namespace-scope variables, static fields, and static local variables.

IRStringLiteral

A variable generated to represent the contents of a string literal. This variable acts much like a read-only global variable.

IRTempVariable

A temporary variable introduced by IR construction. The most common examples are the variable generated to hold the return value of a function, or the variable generated to hold the result of a condition operator (a ? b : c).

IRThisVariable

A temporary variable generated to hold the this pointer.

IRThrowVariable

A temporary variable generated to hold the exception thrown by a ThrowValue instruction.

IRUserVariable

A user-declared variable referenced by the IR for a function.

IRVariable

A variable referenced by the IR for a function.