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

Class ArgumentOperand

An operand representing an argument to a function call. This includes both positional arguments (represented by PositionalArgumentOperand) and the implicit this argument, if any (represented by ThisArgumentOperand).

Import path

import semmle.code.cpp.ir.implementation.raw.Operand

Direct supertypes

Indirect supertypes

Known direct subtypes

    Fields

    Inherited fields

    Predicates

    getCall

    Gets the CallInstruction for which this is an argument.

    Inherited predicates

    getAnyDef

    Gets the Instruction whose result is the value of the operand. Unlike getDef, this also has a result when isDefinitionInexact holds, which means that the resulting instruction may only partially or potentially be the value of this operand.

    from RegisterOperand
    getDef

    Gets the Instruction whose result is the value of the operand. Unlike getAnyDef, this also has no result when isDefinitionInexact holds, which means that the resulting instruction must always be exactly the be the value of this operand.

    from Operand
    getDefinitionOverlap

    Gets the overlap relationship between the operand’s definition and its use.

    from RegisterOperand
    getDumpId

    Gets a string that uniquely identifies this operand on its use instruction.

    from NonPhiOperand
    getDumpLabel

    Gets a prefix to use when dumping the operand in an operand list.

    from NonPhiOperand
    getDumpSortOrder

    Get the order in which the operand should be sorted in the operand list.

    from NonPhiOperand
    getDumpString

    Gets a string describing this operand, suitable for display in IR dumps. This consists of the result ID of the instruction consumed by the operand, plus a label identifying the operand kind.

    from Operand
    getEnclosingIRFunction

    Gets the function that contains this operand.

    from Operand
    getIRType

    Gets the language-neutral type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type.

    from Operand
    getLanguageType

    Gets the type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type.

    from Operand
    getLocation

    Gets the location of the source code for this operand. By default this is where the operand is used, but some subclasses may override this using getAnyDef() if it makes more sense.

    from RegisterOperand
    getOperandTag

    Gets the OperandTag that specifies how this operand is used by its Instruction.

    from NonPhiOperand
    getSize

    Gets the size of the value consumed by this operand, in bytes. If the operand does not have a known constant size, this predicate does not hold.

    from Operand
    getType

    Gets the type of the value consumed by this operand. This is usually the same as the result type of the definition instruction consumed by this operand. For register operands, this is always the case. For some memory operands, the operand type may be different from the definition type, such as in the case of a partial read or a read from a pointer that has been cast to a different type.

    from Operand
    getUse

    Gets the Instruction that consumes this operand.

    from NonPhiOperand
    isDefinitionInexact

    Holds if the result of the definition instruction does not exactly overlap this use.

    from Operand
    isGLValue

    Holds if the value consumed by this operand is a glvalue. If this holds, the value of the operand represents the address of a location, and the type of the location is given by getType(). If this does not hold, the value of the operand represents a value whose type is given by getType().

    from Operand
    toString

    Gets a textual representation of this element.

    from RegisterOperand