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

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

import semmle.code.cpp.ir.IR

Direct supertypes

Known direct subtypes

Predicates

getByteSize

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

getCanonicalLanguageType

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

getIdentityString

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.

toString

Gets a textual representation of this type.