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

Module CppType

Import path

import semmle.code.cpp.ir.internal.CppType

Predicates

getBoolGLValueType

Gets the CppType that represents a glvalue of type bool.

getBoolType

Gets the CppType that represents a prvalue of type bool.

getCanonicalAddressType

Gets the CppType that is the canonical type for an IRAddressType with the specified byteSize.

getCanonicalBooleanType

Gets the CppType that is the canonical type for an IRBooleanType with the specified byteSize.

getCanonicalErrorType

Gets the CppType that is the canonical type for IRErrorType.

getCanonicalFloatingPointType

Gets the CppType that is the canonical type for an IRFloatingPointType with the specified size, base, and type domain.

getCanonicalFunctionAddressType

Gets the CppType that is the canonical type for an IRFunctionAddressType with the specified byteSize.

getCanonicalOpaqueType

Gets the CppType that is the canonical type for an IROpaqueType with the specified tag and byteSize.

getCanonicalSignedIntegerType

Gets the CppType that is the canonical type for an IRSignedIntegerType with the specified byteSize.

getCanonicalUnknownType

Gets the CppType that is the canonical type for IRUnknownType.

getCanonicalUnsignedIntegerType

Gets the CppType that is the canonical type for an IRUnsignedIntegerType with the specified byteSize.

getCanonicalVoidType

Gets the CppType that is the canonical type for IRVoidType.

getFunctionGLValueType

Gets the CppType that represents a glvalue of function type.

getIntType

Gets the CppType that represents a prvalue of type int.

getOpaqueTagIdentityString

Gets a string that uniquely identifies an IROpaqueType tag. Using toString here might not be sufficient to ensure uniqueness, but suffices for our current debugging purposes. To ensure uniqueness getOpaqueTagIdentityString from semmle.code.cpp.Print could be used, but that comes at the cost of importing all the Dump classes defined in that library.

getTypeForGLValue

Gets the CppType that represents a glvalue of type type.

getTypeForPRValue

Gets the CppType that represents a prvalue of type type.

getTypeForPRValueOrUnknown

Gets the CppType that represents a prvalue of type type, if such a CppType exists. Otherwise, gets CppUnknownType.

getUnknownOpaqueType

Gets the CppType that represents a opaque of unknown type with size byteSize.

getUnknownType

Gets the single instance of CppUnknownType.

getVoidType

Gets the CppType that represents a prvalue of type void.

hasAddressType

Holds if an IRAddressType with the specified byteSize should exist.

hasBooleanType

Holds if an IRBooleanType with the specified byteSize should exist.

hasErrorType

Holds if an IRErrorType should exist.

hasFloatingPointType

Holds if an IRFloatingPointType with the specified size, base, and type domain should exist.

hasFunctionAddressType

Holds if an IRFunctionAddressType with the specified byteSize should exist.

hasOpaqueType

Holds if an IROpaqueType with the specified tag and byteSize should exist.

hasSignedIntegerType

Holds if an IRSignedIntegerType with the specified byteSize should exist.

hasUnsignedIntegerType

Holds if an IRUnsignedIntegerType with the specified byteSize should exist.

Classes

CppType

The C++ type of an IR entity. This cannot just be Type for a couple reasons: - Some types needed by the IR might not exist in the database (e.g. RoutineTypes for functions that are always called directly) - Some types needed by the IR are not representable in the C++ type system (e.g. the result type of a VariableAddress where the variable is of reference type)

Modules