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

Class MemoryLocation0

A 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.

Some of these memory locations will be filtered out for performance reasons before being passed to SSA construction.

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
    getAnAllocation

    Gets an allocation associated with this MemoryLocation.

    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