Class IRVariable

A variable referenced by the IR for a function.

The variable may be a user-declared variable (IRUserVariable) or a temporary variable generated by the AST-to-IR translation (IRTempVariable).

Import path

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

Direct supertypes

Known direct subtypes

    Fields

    Predicates

    getAST

    Gets the AST node that declared this variable, or that introduced this variable as part of the AST-to-IR translation.

    getEnclosingFunction

    Gets the function that references this variable.

    getEnclosingIRFunction

    Gets the IR for the function that references this variable.

    getIRType

    Gets the language-neutral type of the variable.

    getLanguageType

    Gets the type of the variable.

    getLocation

    Gets the source location of this variable.

    getType

    Gets the type of the variable.

    getUniqueId

    Gets an identifier string for the variable. This identifier is unique within the function.

    isReadOnly

    Holds if this variable’s value cannot be changed within a function. Currently used for string literals, but could also apply to const global and static variables.

    toString

    Gets a textual representation of this element.

    Charpred