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

Class TranslatedDirectCall

IR translation of a direct call to a specific function. Used for both explicit calls (TranslatedFunctionCall) and implicit calls (TranslatedAllocatorCall).

Import path

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

Direct supertypes

Indirect supertypes

Known direct subtypes

    Inherited fields

    Predicates

    getCallTargetResult

    Gets the instruction whose result value is the target of the call. By default, this is just the result of getCallTarget(), but it can be overridden by a subclass for cases where there is a call target that is not computed from an expression (e.g. a direct call).

    getFirstCallTargetInstruction

    Gets the first instruction of the sequence to evaluate the call target. By default, this is just the first instruction of getCallTarget(), but it can be overridden by a subclass for cases where there is a call target that is not computed from an expression (e.g. a direct call).

    getInstructionSuccessorInternal

    Gets the successor instruction of the instruction that was generated by this element for tag tag. The successor edge kind is specified by kind. This predicate does not usually include destructors, which are inserted as part of getInstructionSuccessor unless handlesDestructorsExplicitly holds.

    hasInstruction

    Holds if this element generates an instruction with opcode opcode and result type resultType. tag must be unique for each instruction generated from the same AST node (not just from the same TranslatedElement). If the instruction does not return a result, resultType should be VoidType.

    Inherited predicates

    getAChild

    Get the immediate child elements of this element.

    from TranslatedElement
    getALastInstruction

    Gets an instruction within this TranslatedElement (including its transitive children) which will be followed by an instruction outside the TranslatedElement.

    from TranslatedElement
    getALastInstructionInternal

    Gets an instruction within this TranslatedElement (including its transitive children) which will be followed by an instruction outside the TranslatedElement. This predicate does not usually include destructors, which are inserted as part of getALastInstruction unless handlesDestructorsExplicitly holds.

    from TranslatedCall
    getAST

    DEPRECATED: Alias for getAst

    from TranslatedElement
    getArgument

    Gets the argument with the specified index. Does not include the this argument.

    from TranslatedCall
    getAst

    Gets the AST node being translated.

    from TranslatedExpr
    getCallResultType

    Gets the result type of the call.

    from TranslatedCall
    getCallTarget

    Gets the TranslatedExpr for the indirect target of the call, if any.

    from TranslatedCall
    getChild

    Gets the immediate child element of this element. The id is unique among all children of this element, but the values are not necessarily consecutive.

    from TranslatedExpr
    getChildInternal

    Gets the immediate child element of this element. The id is unique among all children of this element, but the values are not necessarily consecutive.

    from TranslatedCall
    getChildSuccessor

    Gets the successor instruction to which control should flow after the child element specified by child has finished execution. The successor edge kind is specified by kind.

    from TranslatedElement
    getChildSuccessorInternal

    Gets the successor instruction to which control should flow after the child element specified by child has finished execution. The successor edge kind is specified by kind. This predicate does not usually include destructors, which are inserted as part of getChildSuccessor unless handlesDestructorsExplicitly holds.

    from TranslatedCall
    getEnclosingFunction

    Gets the TranslatedFunction containing this expression.

    from TranslatedExpr
    getExceptionSuccessorInstruction

    Gets the instruction to which control should flow if an exception is thrown within this element. This will generally return first catch block of the nearest enclosing try, or the Unwind instruction for the function if there is no enclosing try. The successor edge kind is specified by kind.

    from TranslatedElement
    getExpr

    Gets the expression from which this TranslatedExpr is generated.

    from TranslatedExpr
    getFirstArgumentOrCallInstruction

    If there are any arguments, gets the first instruction of the first argument. Otherwise, returns the call instruction.

    from TranslatedCall
    getFirstDestructorCallIndex

    Gets the child index of the first destructor call that should be executed after this TranslatedElement

    from TranslatedElement
    getFirstInstruction

    Get the first instruction to be executed in the evaluation of this element when the edge kind is kind.

    from TranslatedCall
    getFunction

    Gets the Function that contains this element.

    from TranslatedExpr
    getId

    Gets the an identifier string for the element. This id is unique within the scope of the element’s function.

    from TranslatedElement
    getInstruction

    Gets the instruction generated by this element with tag tag.

    from TranslatedElement
    getInstructionBuiltInOperation

    If the instruction specified by tag is a BuiltInInstruction, gets the built-in operation.

    from TranslatedElement
    getInstructionConstantValue

    If the instruction specified by tag is a ConstantValueInstruction, gets the constant value for that instruction.

    from TranslatedElement
    getInstructionElementSize

    If the instruction specified by tag is a PointerArithmeticInstruction, gets the size of the type pointed to by the pointer.

    from TranslatedElement
    getInstructionExceptionType

    If the instruction specified by tag is a CatchByTypeInstruction, gets the type of the exception to be caught.

    from TranslatedElement
    getInstructionField

    If the instruction specified by tag is a FieldInstruction, gets the Field for that instruction.

    from TranslatedElement
    getInstructionFunction

    If the instruction specified by tag is a FunctionInstruction, gets the Function for that instruction.

    from TranslatedElement
    getInstructionIndex

    If the instruction specified by tag is an IndexedInstruction, gets the index for that instruction.

    from TranslatedElement
    getInstructionInheritance

    If the instruction specified by tag is an InheritanceConversionInstruction, gets the inheritance relationship for that instruction.

    from TranslatedElement
    getInstructionMemoryOperandType

    Gets the type of the memory operand specified by operandTag on the the instruction specified by tag.

    from TranslatedElement
    getInstructionOperandSize

    Gets the size of the memory operand specified by operandTag on the the instruction specified by tag. Only holds for operands whose type is UnknownType.

    from TranslatedElement
    getInstructionRegisterOperand

    Gets the instruction whose result is consumed as an operand of the instruction specified by tag, with the operand specified by operandTag.

    from TranslatedCall
    getInstructionStringLiteral

    If the instruction specified by tag is a StringConstantInstruction, gets the StringLiteral for that instruction.

    from TranslatedElement
    getInstructionSuccessor

    Gets the successor instruction of the instruction that was generated by this element for tag tag. The successor edge kind is specified by kind.

    from TranslatedElement
    getInstructionVariable

    If the instruction specified by tag is a VariableInstruction, gets the IRVariable for that instruction.

    from TranslatedElement
    getLastChildfrom TranslatedCall
    getLocation

    Gets the location of this element.

    from TranslatedElement
    getNumberOfArgumentsfrom TranslatedCall
    getParent

    Gets the parent element of this element.

    from TranslatedElement
    getPrimaryInstructionForSideEffect

    Gets the primary instruction for the side effect instruction that was generated by this element for tag tag.

    from TranslatedElement
    getQualifier

    Gets the TranslatedExpr for the qualifier of the call (i.e. the value that is passed as the this argument.

    from TranslatedCall
    getQualifierResult

    Gets the instruction whose result value is the this argument of the call. By default, this is just the result of getQualifier(), but it can be overridden by a subclass for cases where there is a this argument that is not computed from a child expression (e.g. a constructor call).

    from TranslatedCall
    getResult

    Gets the instruction that produces the result of the expression.

    from TranslatedCall
    getResultTypefrom TranslatedExpr
    getSideEffectsfrom TranslatedCall
    getTempVariable

    Gets the temporary variable generated by this element with tag tag.

    from TranslatedElement
    handlesDestructorsExplicitly

    Holds if this TranslatedElement includes any destructor calls that must be performed after it in its getChildSuccessorInternal, getInstructionSuccessorInternal, and getALastInstructionInternal relations, rather than needing them inserted.

    from TranslatedElement
    hasAnImplicitDestructorCall

    Holds if this element has implicit destructor calls that should follow it.

    from TranslatedElement
    hasArguments

    Holds if the call has any arguments, not counting the this argument.

    from TranslatedCall
    hasQualifier

    Holds if the call has a this argument.

    from TranslatedCall
    hasTempVariable

    Holds if this element generates a temporary variable with type type. tag must be unique for each variable generated from the same AST node (not just from the same TranslatedElement).

    from TranslatedElement
    isNoReturnfrom TranslatedCall
    isResultGLValue

    Holds if the result of this TranslatedExpr is a glvalue.

    from TranslatedExpr
    mayThrowException

    Holds if the evaluation of this call may throw an exception.

    from TranslatedCall
    mustThrowException

    Holds if the evaluation of this call always throws an exception.

    from TranslatedCall
    needsUnknownOpaqueType

    Holds if the generated IR refers to an opaque type with size byteSize.

    from TranslatedElement
    producesExprResult

    Holds if this TranslatedExpr produces the final result of the original expression from the AST.

    from TranslatedExpr
    toStringfrom TranslatedElement