Module TranslatedExpr

Import path

semmle.code.cpp.ir.implementation.raw.internal.TranslatedExpr

Imports

TranslatedCall
cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

getTranslatedAllocationSize
getTranslatedAllocatorCall
getTranslatedExpr

Gets the TranslatedExpr for the specified expression. If expr is a load, the result is the TranslatedExpr for the load portion.

Classes

StructorCallContext

Abstract class implemented by any TranslatedElement that has a child expression that is a call to a constructor or destructor, in order to provide a pointer to the object being constructed or destroyed.

TranslatedAllocationSize

The IR translation of the allocation size argument passed to operator new in a new expression.

TranslatedAllocatorCall

The IR translation of a call to operator new as part of a new or new[] expression.

TranslatedArithmeticLiteral
TranslatedArrayExpr
TranslatedAssignExpr
TranslatedAssignOperation
TranslatedAssignment
TranslatedBinaryOperation

IR translation of a simple binary operation.

TranslatedBoolConversion

Represents the translation of a BoolConversion expression, which generates a comparison with zero.

TranslatedBuiltInOperation

The IR translation of a built-in operation (i.e. anything that extends BuiltInOperation).

TranslatedCommaExpr
TranslatedConditionDeclExpr

The IR translation of a ConditionDeclExpr, which represents the value of the declared variable after conversion to bool in code such as: if (int* p = &x) { }

TranslatedConditionValue
TranslatedConditionalExpr
TranslatedConstantAllocationSize

The IR translation of a constant allocation size.

TranslatedConstantExpr

IR translation of an expression with a compile-time constant value. This includes not only literals, but also “integral constant expressions” (e.g. 1 + 2).

TranslatedConversion
TranslatedCoreExpr

The IR translation of the “core” part of an expression. This is the part of the expression that produces the result value of the expression, before any lvalue-to-rvalue conversion on the result. Every expression has a single TranslatedCoreExpr.

TranslatedCrementOperation
TranslatedDestructorFieldDestruction

Represents the IR translation of the destruction of a field from within the destructor of the field’s declaring class.

TranslatedDynamicCast

Represents the translation of a dynamic_cast expression.

TranslatedExpr

The IR translation of some part of an expression. A single Expr may consist of multiple TranslatedExpr objects. Every Expr has a single TranslatedCoreExpr, which produces the result of the expression before any implicit lvalue-to-rvalue conversion. Any expression with an lvalue-to-rvalue conversion will also have a TranslatedLoad to perform that conversion on the original result. A few expressions have additional TranslatedExpr objects that compute intermediate values, such as the TranslatedAllocatorCall and TranslatedAllocationSize within the translation of a NewExpr.

TranslatedFieldAccess
TranslatedFunctionAccess
TranslatedInheritanceConversion

Represents the translation of a BaseClassConversion or DerivedClassConversion expression.

TranslatedLoad

IR translation of an implicit lvalue-to-rvalue conversion on the result of an expression.

TranslatedNewArrayExpr

The IR translation of a new[] expression.

TranslatedNewExpr

The IR translation of a new expression.

TranslatedNewOrNewArrayExpr

The IR translation of a new or new[] expression.

TranslatedNonConstantAllocationSize

The IR translation of a non-constant allocation size.

TranslatedNonConstantExpr

IR translation of an expression whose value is not known at compile time.

TranslatedNonFieldVariableAccess
TranslatedPostfixCrementOperation
TranslatedPrefixCrementOperation
TranslatedReThrowExpr

IR translation of a throw expression with no argument (e.g. throw;).

TranslatedSimpleConversion

Represents the translation of a conversion expression that generates a Convert instruction.

TranslatedSingleInstructionConversion

Represents the translation of a conversion expression that generates a single instruction.

TranslatedSingleInstructionExpr

IR translation of an expression that performs a single operation on its operands and returns the result.

TranslatedStringLiteral
TranslatedThisExpr
TranslatedThrowExpr

IR translation of a throw expression.

TranslatedThrowValueExpr

IR translation of a throw expression with an argument (e.g. throw std::bad_alloc()).

TranslatedTransparentConversion
TranslatedTransparentExpr
TranslatedTransparentUnaryOperation
TranslatedUnaryExpr
TranslatedVarArg

The IR translation of a BuiltInVarArg expression.

TranslatedVarArgCopy

The IR translation of a BuiltInVarArgCopy expression.

TranslatedVarArgsEnd

The IR translation of a BuiltInVarArgsEnd expression.

TranslatedVarArgsStart

The IR translation of a BuiltInVarArgsStart expression.

TranslatedVariableAccess