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

Class IRType

The language-neutral type of an IR Instruction, Operand, or IRVariable. The interface to IRType and its subclasses is the same across all languages for which the IR is supported, so analyses that expect to be used for multiple languages should generally use IRType rather than a language-specific type.

Many types from the language-specific type system will map to a single canonical IRType. Two types that map to the same IRType are considered equivalent by the IR. As an example, in C++, all pointer types map to the same instance of IRAddressType.

Import path


Direct supertypes

Known direct subtypes



Gets the size of the type, in bytes, if known.


Gets a single instance of LanguageType that maps to this IRType.


Gets a string that uniquely identifies this IRType. This string is often the same as the result of IRType.toString(), but for some types it may be more verbose to ensure uniqueness.


Gets a textual representation of this type.