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

Module TranslatedElement

Import path

import semmle.code.cpp.ir.implementation.raw.internal.TranslatedElement

Imports

IR

Provides classes that describe the Intermediate Representation (IR) of the program.

IRDeclarationEntries

Predicates

getIRTempVariable
getIRUserVariable
getRealParent

Gets the “real” parent of expr. This predicate treats conversions as if they were explicit nodes in the expression tree, rather than as implicit nodes as in the regular AST representation.

hasTranslatedLoad

Holds if expr should have a TranslatedLoad on it.

hasTranslatedSyntheticTemporaryObject

Holds if expr should have a TranslatedSyntheticTemporaryObject on it.

ignoreLoad

Holds if expr has an lvalue-to-rvalue conversion that should be ignored when generating IR. This occurs for conversion from an lvalue of function type to an rvalue of function pointer type. The conversion is represented in the AST as an lvalue-to-rvalue conversion, but the IR represents both a function lvalue and a function pointer prvalue the same.

isIRConstant

Holds if expr is a constant of a type that can be replaced directly with its value in the IR. This does not include address constants as we have no means to express those as QL values.

isPRValueConversionOnGLValue

Holds if expr is a conversion that is originally a prvalue-to-prvalue conversion, but which is applied to a prvalue that will actually be consumed as a glvalue.

Classes

RuntimeInitializedStaticLocalVariable
StaticInitializedStaticLocalVariable
TranslatedElement

Represents an AST node for which IR needs to be generated.

TranslatedRootElement

The IR translation of a root element, either a function or a global variable.

Datatypes