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

Class MemoryLocation

Represents the memory location accessed by a memory operand or memory result. In this implementation, the location is one of the following:

  • VariableMemoryLocation - A location within a known IRVariable, at an offset that is either a constant or is unknown.
  • UnknownMemoryLocation - A location not known to be within a specific IRVariable.

Import path

import semmle.code.cpp.ir.implementation.aliased_ssa.internal.AliasedSSA

Direct supertypes

Known direct subtypes

    Predicates

    canDefineReadOnly

    Holds if a definition of this location can be the definition of a read-only use location.

    canReuseSSA

    DEPRECATED: Alias for canReuseSsa

    canReuseSsa
    getAllocation
    getIRFunction
    getIRType
    getLocation
    getType
    getUniqueId
    getVirtualVariable
    isAlwaysAllocatedOnStack

    Holds if the location always represents memory allocated on the stack (for example, a variable with automatic storage duration).

    isMayAccess
    isReadOnly

    Holds if the location cannot be overwritten except by definition of a MemoryLocation for which def.canDefineReadOnly() holds.

    toString
    toStringInternal