clang 10.0.0git

Classes | Typedefs | Enumerations | Functions
clang::interp Namespace Reference

## Classes
class | Block
| A memory block, either on the stack or in the heap. More...
class | BlockScope
| Scope for storage declared in a compound statement. More...
class | Boolean
| Wrapper around boolean types. More...
class | ByteCodeEmitter
| An emitter which links the program to bytecode for later use. More...
class | ByteCodeExprGen
| Compilation context for expressions. More...
struct | ByteCodeGenError
| Error thrown by the compiler. More...
class | ByteCodeStmtGen
| Compilation context for statements. More...
class | CodePtr
| Pointer into the code segment. More...
class | Context
| Holds all information required to evaluate constexpr code in a module. More...
class | DeadBlock
| Descriptor for a dead block. More...
class | DeclScope
| Scope used to handle temporaries in toplevel variable declarations. More...
struct | Descriptor
| Describes a memory block created by an allocation site. More...
class | EvalEmitter
| An emitter which evaluates opcodes as they are emitted. More...
class | ExprScope
| Expression scope which tracks potentially lifetime extended temporaries which are hoisted to the parent scope on exit. More...
class | Frame
| Base class for stack frames, shared between VM and walker. More...
class | Function
| Bytecode function. More...
struct | InitMap
| Bitfield tracking the initialisation status of elements of primitive arrays. More...
struct | InlineDescriptor
| Inline descriptor embedded in structures and arrays. More...
class | Integral
| Wrapper around numeric types. More...
class | InterpFrame
| Frame storing local variables. More...
class | InterpStack
| Stack frame storing temporaries and parameters. More...
class | InterpState
| Interpreter context. More...
class | LabelScope
| Scope managing label targets. More...
class | LocalScope
| Scope for local variables. More...
class | LoopScope
| Sets the context for break/continue statements. More...
class | OptionScope
| Scope used to handle initialization methods. More...
class | Pointer
| A pointer to a memory block, live or dead. More...
struct | PrimConv
| Mapping from primitive types to their representation. More...
struct | PrimConv< PT_Bool >
struct | PrimConv< PT_Ptr >
struct | PrimConv< PT_Sint16 >
struct | PrimConv< PT_Sint32 >
struct | PrimConv< PT_Sint64 >
struct | PrimConv< PT_Sint8 >
struct | PrimConv< PT_Uint16 >
struct | PrimConv< PT_Uint32 >
struct | PrimConv< PT_Uint64 >
struct | PrimConv< PT_Uint8 >
class | Program
| The program contains and links the bytecode for all functions. More...
class | Record
| Structure/Class descriptor. More...
class | RecordScope
struct | Repr
struct | Repr< 16, false >
struct | Repr< 16, true >
struct | Repr< 32, false >
struct | Repr< 32, true >
struct | Repr< 64, false >
struct | Repr< 64, true >
struct | Repr< 8, false >
struct | Repr< 8, true >
class | Scope
| Describes a scope block. More...
class | SourceInfo
| Describes the statement/declaration an opcode was generated from. More...
class | SourceMapper
| Interface for classes which map locations to sources. More...
class | State
| Interface for the VM to interact with the AST walker's context. More...
class | SwitchScope
class | VariableScope
| Scope chain managing the variable lifetimes. More...

## Typedefs
using | DeclTy = unsigned llvm::PointerUnion< const Decl *, const Expr * >
using | BlockCtorFn = void(*)(Block *Storage, char *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, Descriptor *FieldDesc)
| Invoked whenever a block is created. More...
using | BlockDtorFn = void(*)(Block *Storage, char *FieldPtr, Descriptor *FieldDesc)
| Invoked when a block is destroyed. More...
using | BlockMoveFn = void(*)(Block *Storage, char *SrcFieldPtr, char *DstFieldPtr, Descriptor *FieldDesc)
| Invoked when a block with pointers referencing it goes out of scope. More...
using | InterpSize = unsigned
| Object size as used by the interpreter. More...
using | APInt = llvm::APInt
using | APSInt = llvm::APSInt
using | CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
using | SourceMap = std::vector< std::pair< unsigned, SourceInfo > >

## Enumerations
enum | Opcode : uint32_t
enum | PrimType : unsigned { PT_Sint8, PT_Uint8, PT_Sint16, PT_Uint16, PT_Sint32, PT_Uint32, PT_Sint64, PT_Uint64, PT_Bool, PT_Ptr }
| Enumeration of the primitive types of the VM. More...

## Functions
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Boolean &B)
template<typename T >
ComparisonCategoryResult | Compare (const T &X, const T &Y)
| Helper to compare two comparable types. More...
template<unsigned Bits, bool Signed>
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I)
bool | CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if the variable has externally defined storage. More...
bool | CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if the array is offsetable. More...
bool | CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
| Checks if a pointer is live and accesible. More...
bool | CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
| Checks if a pointer is null. More...
bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
| Checks if a pointer is in range. More...
bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
| Checks if a field from which a pointer is going to be derived is valid. More...
bool | CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a pointer points to const storage. More...
bool | CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a pointer points to a mutable field. More...
bool | CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a value can be loaded from a block. More...
bool | CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a value can be stored in a block. More...
bool | CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a method can be invoked on an object. More...
bool | CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
| Checks if a value can be initialized. More...
bool | CheckCallable (InterpState &S, CodePtr OpPC, Function *F)
| Checks if a method can be called. More...
bool | CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
| Checks the 'this' pointer. More...
bool | CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)
| Checks if a method is pure virtual. More...
bool | Interpret (InterpState &S, APValue &Result)
| Interpreter entry point. More...
template<typename T >
bool | ReturnValue (const T &V, APValue &R)
| Convers a value to an APValue. More...
template<typename T >
bool | IsTrue (const T &V)
template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP>
bool | AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Add (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Sub (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Mul (InterpState &S, CodePtr OpPC)
template<typename T >
bool | CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn)
template<typename T >
bool | CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn)
template<>
bool | CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
template<>
bool | CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | EQ (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | NE (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | LT (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | LE (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GT (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GE (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InRange (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Dup (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Pop (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Const (InterpState &S, CodePtr OpPC, const T &Arg)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetParam (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SetParam (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SetField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitThisField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitThisBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitThisFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
bool | GetPtrLocal (InterpState &S, CodePtr OpPC, uint32_t I)
bool | GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t I)
bool | GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
bool | GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | GetPtrActiveField (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | GetPtrActiveThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
bool | VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)
bool | GetPtrVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
bool | GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Load (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | LoadPop (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Store (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | StorePop (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | StoreBitField (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | StoreBitFieldPop (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitPop (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitElem (InterpState &S, CodePtr OpPC, uint32_t Idx)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx)
template<class T , bool Add>
bool | OffsetHelper (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | AddOffset (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | SubOffset (InterpState &S, CodePtr OpPC)
bool | Destroy (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType TIn, PrimType TOut>
bool | Cast (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Zero (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool | Null (InterpState &S, CodePtr OpPC)
bool | This (InterpState &S, CodePtr OpPC)
template<PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>
unsigned | Trunc (InterpState &S, CodePtr OpPC, unsigned Bits, const T &V)
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool | ShiftRight (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool | ShiftLeft (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
template<PrimType TL, PrimType TR>
bool | Shr (InterpState &S, CodePtr OpPC)
template<PrimType TL, PrimType TR>
bool | Shl (InterpState &S, CodePtr OpPC)
bool | NoRet (InterpState &S, CodePtr OpPC)
bool | NarrowPtr (InterpState &S, CodePtr OpPC)
bool | ExpandPtr (InterpState &S, CodePtr OpPC)
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Pointer &P)
size_t | primSize (PrimType Type)
| Returns the size of a primitive type in bytes. More...
constexpr size_t | align (size_t Size)
| Aligns a size to the pointer alignment. More...
bool | isPrimitiveIntegral (PrimType Type)

## Typedef Documentation

## ◆ APInt

typedef llvm::APInt clang::interp::APInt

Definition at line 27 of file Integral.h.

## ◆ APSInt

typedef llvm::APSInt clang::interp::APSInt

Definition at line 28 of file Integral.h.

## ◆ BlockCtorFn

using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, char *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, Descriptor *FieldDesc)

Invoked whenever a block is created.

The constructor method fills in the inline descriptors of all fields and array elements. It also initializes all the fields which contain non-trivial types.

Definition at line 33 of file Descriptor.h.

## ◆ BlockDtorFn

using clang::interp::BlockDtorFn = typedef void (*)(Block *Storage, char *FieldPtr, Descriptor *FieldDesc)

Invoked when a block is destroyed.

Invokes the destructors of all non-trivial nested fields of arrays and records.

Definition at line 38 of file Descriptor.h.

## ◆ BlockMoveFn

using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, char *SrcFieldPtr, char *DstFieldPtr, Descriptor *FieldDesc)

Invoked when a block with pointers referencing it goes out of scope.

Such blocks are persisted: the move function copies all inline descriptors and non-trivial fields, as existing pointers might need to reference those descriptors. Data is not copied since it cannot be legally read.

Definition at line 45 of file Descriptor.h.

## ◆ CompareFn

using clang::interp::CompareFn = typedef llvm::function_ref<bool(ComparisonCategoryResult)>

Definition at line 159 of file Interp.h.

## ◆ DeclTy

using clang::interp::DeclTy = typedef unsigned llvm::PointerUnion<const Decl *, const Expr *>

Definition at line 26 of file Descriptor.h.

## ◆ InterpSize

using clang::interp::InterpSize = typedef unsigned

Object size as used by the interpreter.

Definition at line 48 of file Descriptor.h.

## ◆ SourceMap

using clang::interp::SourceMap = typedef std::vector<std::pair<unsigned, SourceInfo> >

Definition at line 99 of file Source.h.

## Enumeration Type Documentation

## ◆ Opcode

enum clang::interp::Opcode : uint32_t

Definition at line 21 of file Opcode.h.

## ◆ PrimType

enum clang::interp::PrimType : unsigned

Enumeration of the primitive types of the VM.

Enumerator
PT_Sint8 |
PT_Uint8 |
PT_Sint16 |
PT_Uint16 |
PT_Sint32 |
PT_Uint32 |
PT_Sint64 |
PT_Uint64 |
PT_Bool |
PT_Ptr |

Definition at line 27 of file PrimType.h.

## Function Documentation

## ◆ Add()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Add | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 132 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::format::configurationAsText(), EmitAtomicIncrementValue(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(), parseSanitizeTrapArgs(), and clang::driver::SanitizerArgs::SanitizerArgs().

## ◆ AddOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::AddOffset | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 777 of file Interp.h.

Referenced by clang::ASTRecordWriter::AddCXXBaseSpecifiers(), and clang::ASTRecordWriter::AddCXXCtorInitializers().

## ◆ AddSubMulHelper()

template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP>

bool clang::interp::AddSubMulHelper | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | unsigned | Bits,
|  | const T & | LHS,
|  | const T & | RHS
| ) |  |

Definition at line 102 of file Interp.h.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::InterpState::noteUndefinedBehavior(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::interp::InterpState::Stk, toString(), and Trunc().

## ◆ align()

constexpr size_t clang::interp::align | ( | size_t | Size | ) |

Aligns a size to the pointer alignment.

Definition at line 57 of file PrimType.h.

Referenced by clang::interp::InitMap::allocate(), buildBlockDescriptor(), clang::interp::ByteCodeEmitter::compileFunc(), computeBlockInfo(), clang::interp::ByteCodeEmitter::createLocal(), clang::interp::InterpFrame::describe(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getAggregateAddress(), clang::interp::Descriptor::getLocation(), clang::interp::Program::getOrCreateRecord(), clang::QualifiedTypeLoc::getUnqualifiedLoc(), and clang::CodeGen::DominatingLLVMValue::save().

## ◆ Cast()

template<PrimType TIn, PrimType TOut>

bool clang::interp::Cast | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 800 of file Interp.h.

References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by clang::Sema::ActOnStmtExprResult(), castStringLiteralToDefaultAddressSpace(), convertVector(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), FindVA(), clang::ento::getDynamicCastInfo(), clang::ento::StoreManager::getSizeInElements(), ignorePointerCastsAndParens(), InitCatchParam(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), clang::CodeGen::CodeGenFunction::LoadCXXVTT(), and clang::consumed::ConsumedStmtVisitor::VisitCastExpr().

## ◆ CheckArray()

bool clang::interp::CheckArray | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if the array is offsetable.

Definition at line 194 of file Interp.cpp.

## ◆ CheckCallable()

bool clang::interp::CheckCallable | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | Function * | F
| ) |  |

Checks if a method can be called.

Definition at line 333 of file Interp.cpp.

## ◆ CheckConst()

bool clang::interp::CheckConst | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a pointer points to const storage.

Definition at line 258 of file Interp.cpp.

## ◆ CheckExtern()

bool clang::interp::CheckExtern | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if the variable has externally defined storage.

Definition at line 181 of file Interp.cpp.

Referenced by GetPtrField(), and ReturnValue().

## ◆ CheckInit()

bool clang::interp::CheckInit | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a value can be initialized.

Definition at line 325 of file Interp.cpp.

Referenced by InitElem(), InitElemPop(), and InitPop().

## ◆ CheckInvoke()

bool clang::interp::CheckInvoke | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a method can be invoked on an object.

Definition at line 315 of file Interp.cpp.

## ◆ CheckLive()

bool clang::interp::CheckLive | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr,
|  | AccessKinds | AK
| ) |  |

Checks if a pointer is live and accesible.

Definition at line 202 of file Interp.cpp.

## ◆ CheckLoad()

bool clang::interp::CheckLoad | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a value can be loaded from a block.

Definition at line 283 of file Interp.cpp.

Referenced by GetField(), GetFieldPop(), GetThisField(), Load(), and LoadPop().

## ◆ CheckMutable()

bool clang::interp::CheckMutable | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a pointer points to a mutable field.

Definition at line 270 of file Interp.cpp.

## ◆ CheckNull()

bool clang::interp::CheckNull | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr,
|  | CheckSubobjectKind | CSK
| ) |  |

Checks if a pointer is null.

Definition at line 231 of file Interp.cpp.

Referenced by GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrBase(), GetPtrField(), GetPtrVirtBase(), OffsetHelper(), and SetField().

## ◆ CheckPure()

bool clang::interp::CheckPure | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const CXXMethodDecl * | MD
| ) |  |

Checks if a method is pure virtual.

Definition at line 393 of file Interp.cpp.

## ◆ CheckRange() [1/2]

bool clang::interp::CheckRange | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr,
|  | AccessKinds | AK
| ) |  |

Checks if a pointer is in range.

Definition at line 240 of file Interp.cpp.

Referenced by GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrField(), clang::interp::Integral< Bits, Signed >::mul(), OffsetHelper(), and SetField().

## ◆ CheckRange() [2/2]

bool clang::interp::CheckRange | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr,
|  | CheckSubobjectKind | CSK
| ) |  |

Checks if a field from which a pointer is going to be derived is valid.

Definition at line 249 of file Interp.cpp.

## ◆ CheckStore()

bool clang::interp::CheckStore | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | Ptr
| ) |  |

Checks if a value can be stored in a block.

Definition at line 301 of file Interp.cpp.

Referenced by SetField(), SetThisField(), Store(), StoreBitField(), StoreBitFieldPop(), and StorePop().

## ◆ CheckThis()

bool clang::interp::CheckThis | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Pointer & | This
| ) |  |

Checks the 'this' pointer.

Definition at line 375 of file Interp.cpp.

Referenced by GetPtrActiveThisField(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisField(), InitThisFieldActive(), SetThisField(), and This().

## ◆ CmpHelper()

template<typename T >

bool clang::interp::CmpHelper | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | CompareFn | Fn
| ) |  |

Definition at line 162 of file Interp.h.

References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ CmpHelper< Pointer >()

template<>

bool clang::interp::CmpHelper< Pointer > | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | CompareFn | Fn
| ) |  |
| inline

Definition at line 176 of file Interp.h.

## ◆ CmpHelperEQ()

template<typename T >

bool clang::interp::CmpHelperEQ | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | CompareFn | Fn
| ) |  |

Definition at line 171 of file Interp.h.

## ◆ CmpHelperEQ< Pointer >()

template<>

bool clang::interp::CmpHelperEQ< Pointer > | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | CompareFn | Fn
| ) |  |
| inline

Definition at line 194 of file Interp.h.

## ◆ Compare()

template<typename T >

ComparisonCategoryResult clang::interp::Compare | ( | const T & | X,
|  | const T & | Y
| ) |  |

Helper to compare two comparable types.

Definition at line 32 of file Integral.h.

References clang::Equal, clang::Greater, and clang::Less.

Referenced by clang::interp::Boolean::compare(), clang::interp::Integral< Bits, Signed >::compare(), clang::CloneConstraint::filterGroups(), clang::ContinuousRangeMap< serialization::IdentID, ModuleFile *, 4 >::find(), clang::ContinuousRangeMap< serialization::IdentID, ModuleFile *, 4 >::insertOrReplace(), clang::CloneConstraint::splitCloneGroups(), and clang::ContinuousRangeMap< Int, V, InitialCapacity >::Builder::~Builder().

## ◆ Const()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Const | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const T & | Arg
| ) |  |

Definition at line 294 of file Interp.h.

References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by clang::Qualifiers::addConst(), AnalyzeComparison(), clang::CodeGen::LValue::getVRQualifiers(), clang::Qualifiers::hasConst(), clang::Qualifiers::hasOnlyConst(), and clang::Qualifiers::removeConst().

## ◆ Destroy()

bool clang::interp::Destroy | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |
| inline

Definition at line 791 of file Interp.h.

References clang::interp::InterpState::Current, and clang::interp::InterpFrame::destroy().

Referenced by pushTemporaryCleanup().

## ◆ Dup()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Dup | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 278 of file Interp.h.

References clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ EQ()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::EQ | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 216 of file Interp.h.

Referenced by CompactMacroExpandedPieces(), clang::ento::BugReporter::FlushReports(), isKnownToHaveUnsignedValue(), and llvm::DOTGraphTraits< ExplodedGraph * >::nodeHasBugReport().

## ◆ ExpandPtr()

bool clang::interp::ExpandPtr | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 945 of file Interp.h.

References clang::interp::Pointer::expand(), Interpret(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GE()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GE | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 252 of file Interp.h.

Referenced by isKnownToHaveUnsignedValue(), and clang::Expr::isNullPointerConstant().

## ◆ GetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 331 of file Interp.h.

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetFieldPop | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 360 of file Interp.h.

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetGlobal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 403 of file Interp.h.

References clang::interp::Program::getGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetLocal()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetLocal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 304 of file Interp.h.

References clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocal(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetParam | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 316 of file Interp.h.

References clang::interp::InterpState::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getParam(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrActiveField()

bool clang::interp::GetPtrActiveField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 539 of file Interp.h.

References clang::interp::Pointer::activate(), clang::interp::Pointer::atField(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deactivate(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrActiveThisField()

bool clang::interp::GetPtrActiveThisField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 552 of file Interp.h.

References clang::interp::Pointer::activate(), clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Pointer::deactivate(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrBase()

bool clang::interp::GetPtrBase | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 565 of file Interp.h.

References clang::interp::Pointer::atField(), CheckNull(), clang::CSK_Base, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrField()

bool clang::interp::GetPtrField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 517 of file Interp.h.

References clang::interp::Pointer::atField(), CheckExtern(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrGlobal()

bool clang::interp::GetPtrGlobal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |
| inline

Definition at line 512 of file Interp.h.

References clang::interp::Program::getPtrGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrLocal()

bool clang::interp::GetPtrLocal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |
| inline

Definition at line 499 of file Interp.h.

References clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocalPointer(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrParam()

bool clang::interp::GetPtrParam | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |
| inline

Definition at line 504 of file Interp.h.

References clang::interp::InterpState::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getParamPointer(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrThisBase()

bool clang::interp::GetPtrThisBase | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 573 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrThisField()

bool clang::interp::GetPtrThisField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Off
| ) |  |
| inline

Definition at line 529 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GetPtrThisVirtBase()

bool clang::interp::GetPtrThisVirtBase | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const RecordDecl * | D
| ) |  |
| inline

Definition at line 601 of file Interp.h.

References clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), and VirtBaseHelper().

## ◆ GetPtrVirtBase()

bool clang::interp::GetPtrVirtBase | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const RecordDecl * | D
| ) |  |
| inline

Definition at line 594 of file Interp.h.

References CheckNull(), clang::CSK_Base, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and VirtBaseHelper().

## ◆ GetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GetThisField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 374 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckLoad(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ GT()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::GT | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 245 of file Interp.h.

Referenced by clang::ento::MemRegionManager::getVarRegion(), and isKnownToHaveUnsignedValue().

## ◆ InitBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitBitField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Record::Field * | F
| ) |  |

Definition at line 475 of file Interp.h.

References clang::interp::Record::Field::Decl, clang::FieldDecl::getBitWidthValue(), clang::interp::InterpState::getCtx(), clang::interp::Record::Field::Offset, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitElem()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitElem | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Idx
| ) |  |

Definition at line 693 of file Interp.h.

References CheckInit(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitElemPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitElemPop | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | Idx
| ) |  |

Definition at line 704 of file Interp.h.

References CheckInit(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 465 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::Sema::CheckTransparentUnionArgumentConstraints(), and getEntityLifetime().

## ◆ InitFieldActive()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitFieldActive | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 485 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitGlobal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 418 of file Interp.h.

References clang::interp::Block::deref(), clang::interp::Program::getGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitPop | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 682 of file Interp.h.

References CheckInit(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitThisBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitThisBitField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const Record::Field * | F
| ) |  |

Definition at line 437 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Record::Field::Decl, clang::interp::Pointer::deref(), clang::FieldDecl::getBitWidthValue(), clang::interp::InterpState::getCtx(), clang::interp::InterpFrame::getThis(), clang::interp::Pointer::initialize(), clang::interp::Record::Field::Offset, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitThisField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 424 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::InterpFrame::getThis(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InitThisFieldActive()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InitThisFieldActive | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 451 of file Interp.h.

References clang::interp::Pointer::activate(), clang::interp::Pointer::atField(), clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::InterpFrame::getThis(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ InRange()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::InRange | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 264 of file Interp.h.

References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by clang::ento::SimpleConstraintManager::assumeInclusiveRange(), isKnownToHaveUnsignedValue(), clang::ento::RangedConstraintManager::RangedConstraintManager(), and clang::ento::SimpleConstraintManager::SimpleConstraintManager().

## ◆ Interpret()

bool clang::interp::Interpret | ( | InterpState & | S,
|  | APValue & | Result
| ) |  |

Interpreter entry point.

Definition at line 401 of file Interp.cpp.

Referenced by ExpandPtr().

## ◆ isPrimitiveIntegral()

bool clang::interp::isPrimitiveIntegral | ( | PrimType | Type | ) |
| inline

Definition at line 61 of file PrimType.h.

References PT_Bool, PT_Sint16, PT_Sint32, PT_Sint64, PT_Sint8, PT_Uint16, PT_Uint32, PT_Uint64, and PT_Uint8.

## ◆ IsTrue()

template<typename T >

bool clang::interp::IsTrue | ( | const T & | V | ) |
| inline

Definition at line 94 of file Interp.h.

References bool.

## ◆ LE()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::LE | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 237 of file Interp.h.

Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), AddLazyVectorDecls(), computeTargetTriple(), CreateSLocExpansionAbbrev(), clang::RecursiveASTVisitor< CallGraph >::dataTraverseStmtPost(), DetectLibcxxIncludePath(), findGccVersion(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getBiarchSibling(), clang::ento::ExprEngine::getCoreEngine(), getDeclForLocalLookup(), isKnownToHaveUnsignedValue(), LookThroughTransitiveAssignmentsAndCommaOperators(), clang::ObjCInterfaceDecl::setEndOfDefinitionLoc(), and clang::interp::ByteCodeExprGen< Emitter >::VisitIntegerLiteral().

## ◆ Load()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Load | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 616 of file Interp.h.

References CheckLoad(), clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by addSanitizersAtO0(), clang::Sema::BuildAtomicExpr(), CreateCoercedLoad(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), EmitAtomicOp(), EmitISOVolatileLoad(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), and TransitionToCleanupSwitch().

## ◆ LoadPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::LoadPop | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 625 of file Interp.h.

References CheckLoad(), clang::interp::Pointer::deref(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ LT()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::LT | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 230 of file Interp.h.

Referenced by clang::interp::ByteCodeExprGen< Emitter >::VisitBinaryOperator().

## ◆ Mul()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Mul | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 148 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue().

## ◆ NarrowPtr()

bool clang::interp::NarrowPtr | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 939 of file Interp.h.

References clang::interp::Pointer::narrow(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ NE()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::NE | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 223 of file Interp.h.

Referenced by clang::tooling::AtomicChange::convertFromYAML(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ConstructionContext::createFromLayers(), ctorArrayTy(), clang::DEF_TRAVERSE_TYPE(), DiagnoseMismatchedNewDelete(), dtorArrayTy(), clang::NewAllocatedObjectConstructionContext::getCXXNewExpr(), clang::ento::ExprEngine::getGraph(), clang::FunctionProtoType::hasDependentExceptionSpec(), clang::FunctionProtoType::hasInstantiationDependentExceptionSpec(), hasNonTrivialConstructorCall(), llvm::DenseMapInfo< ObjectUnderConstruction >::isEqual(), isKnownToHaveUnsignedValue(), clang::JSONNodeDumper::JSONNodeDumper(), moveArrayTy(), llvm::FoldingSetTrait< AllocKind >::Profile(), clang::ento::CheckerManager::runCheckersForBranchCondition(), clang::ento::CheckerManager::runCheckersForPostCall(), and clang::HeaderSearch::suggestPathToFileForDiagnostics().

## ◆ NoRet()

bool clang::interp::NoRet | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 929 of file Interp.h.

References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getCallee(), and clang::Decl::getEndLoc().

Referenced by clang::ento::RetEffect::MakeNoRet().

## ◆ Null()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Null | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 818 of file Interp.h.

References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by clang::CodeGen::CodeGenFunction::EmitCheckedLValue(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), clang::TemplateArgument::isNull(), clang::TreeTransform< Derived >::RebuildPackExpansion(), clang::CodeGen::CodeGenFunction::sanitizePerformTypeCheck(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::TemplateArgument::TemplateArgument(), clang::TreeTransform< Derived >::TransformTemplateArgument(), and clang::templateargumentvisitor::Base< std::add_lvalue_reference, ImplClass, RetTy, ParamTys... >::Visit().

## ◆ OffsetHelper()

template<class T , bool Add>

bool clang::interp::OffsetHelper | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 718 of file Interp.h.

References CheckNull(), CheckRange(), clang::CSK_ArrayIndex, clang::CSK_ArrayToPointer, Offset, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ operator<<() [1/3]

llvm::raw_ostream& clang::interp::operator<< | ( | llvm::raw_ostream & | OS,
|  | const Boolean & | B
| ) |  |
| inline

Definition at line 140 of file Boolean.h.

References clang::interp::Boolean::print().

## ◆ operator<<() [2/3]

template<unsigned Bits, bool Signed>

llvm::raw_ostream& clang::interp::operator<< | ( | llvm::raw_ostream & | OS,
|  | Integral< Bits, Signed > | I
| ) |  |

Definition at line 261 of file Integral.h.

## ◆ operator<<() [3/3]

llvm::raw_ostream& clang::interp::operator<< | ( | llvm::raw_ostream & | OS,
|  | const Pointer & | P
| ) |  |
| inline

Definition at line 345 of file Pointer.h.

References clang::interp::Pointer::print().

## ◆ Pop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Pop | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 284 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by ParseLoopHintValue(), and PragmaLoopHintString().

## ◆ primSize()

size_t clang::interp::primSize | ( | PrimType | Type | ) |

Returns the size of a primitive type in bytes.

Definition at line 17 of file PrimType.cpp.

References TYPE_SWITCH.

Referenced by clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::Program::createDescriptor(), and clang::interp::InterpFrame::describe().

## ◆ ReturnValue()

template<typename T >

bool clang::interp::ReturnValue | ( | const T & | V,
|  | APValue & | R
| ) |  |

Convers a value to an APValue.

Definition at line 41 of file Interp.h.

References CheckExtern().

Referenced by clang::CodeGen::CGCUDARuntime::CGCUDARuntime(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitTargetBuiltinExpr(), clang::for(), clang::CoroutineBodyStmt::getReturnValueInit(), and PerformReturnAdjustment().

## ◆ SetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SetField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 345 of file Interp.h.

References CheckNull(), CheckRange(), CheckStore(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ SetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SetGlobal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 412 of file Interp.h.

## ◆ SetLocal()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SetLocal | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 310 of file Interp.h.

References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setLocal(), and clang::interp::InterpState::Stk.

## ◆ SetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SetParam | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 325 of file Interp.h.

References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setParam(), and clang::interp::InterpState::Stk.

## ◆ SetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SetThisField | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | uint32_t | I
| ) |  |

Definition at line 388 of file Interp.h.

References clang::interp::InterpState::checkingPotentialConstantExpression(), CheckStore(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ ShiftLeft()

template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>

bool clang::interp::ShiftLeft | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const T & | V,
|  | unsigned | RHS
| ) |  |
| inline

Definition at line 871 of file Interp.h.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and V.

## ◆ ShiftRight()

template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>

bool clang::interp::ShiftRight | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const T & | V,
|  | unsigned | RHS
| ) |  |
| inline

Definition at line 861 of file Interp.h.

References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

## ◆ Shl()

template<PrimType TL, PrimType TR>

bool clang::interp::Shl | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 911 of file Interp.h.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getSource(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(), and EmitX86CvtBF16ToFloatExpr().

## ◆ Shr()

template<PrimType TL, PrimType TR>

bool clang::interp::Shr | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 896 of file Interp.h.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getSource(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue().

## ◆ Store()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Store | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 634 of file Interp.h.

References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ StoreBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::StoreBitField | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 654 of file Interp.h.

References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpState::getCtx(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ StoreBitFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::StoreBitFieldPop | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 668 of file Interp.h.

References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpState::getCtx(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ StorePop()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::StorePop | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 644 of file Interp.h.

References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

## ◆ Sub()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Sub | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 140 of file Interp.h.

References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::Preprocessor::CheckEndOfDirective(), EmitAtomicDecrementValue(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(), EmitX86Abs(), getNumberOfModules(), print_elem(), clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printBBInstr(), clang::threadSafety::til::PrettyPrinter< StdPrinter, std::ostream >::printSExpr(), shouldAddCase(), and clang::TreeTransform< Derived >::TransformCXXNamedCastExpr().

## ◆ SubOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::SubOffset | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 782 of file Interp.h.

## ◆ This()

bool clang::interp::This | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |
| inline

Definition at line 827 of file Interp.h.

References clang::interp::InterpState::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by clang::CodeGen::CGCXXABI::adjustThisArgumentForVirtualFunctionCall(), clang::Sema::BuildCXXThisExpr(), clang::Sema::CheckDestructor(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), emitRTtypeidCall(), EvaluateComplex(), EvaluateMemberPointer(), EvaluateVector(), clang::CodeGen::CodeGenFunction::FieldConstructionScope::FieldConstructionScope(), forConstantArrayExpansion(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), getBadTypeidFn(), clang::Sema::ImplicitExceptionSpecification::getExceptionSpec(), getPrettyTypeName(), HandleConstructorCall(), HandleDestruction(), HandleDestructionImpl(), hasDefaultCXXMethodCC(), llvm::DenseMapInfo< ObjCSummaryKey >::isEqual(), clang::Expr::isImplicitCXXThis(), clang::CodeGen::CGCXXABI::isSRetParameterAfterThis(), clang::Module::isSubModuleOf(), clang::CodeGen::CodeGenFunction::LoadCXXVTT(), clang::ComparisonCategories::lookupInfo(), MaybeElementDependentArrayFiller(), clang::ento::ExprEngine::processCallExit(), and clang::TreeTransform< Derived >::TransformFunctionProtoType().

## ◆ Trunc()

template<PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>

unsigned clang::interp::Trunc | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | unsigned | Bits,
|  | const T & | V
| ) |  |

Definition at line 846 of file Interp.h.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getType(), and V.

Referenced by AddSubMulHelper().

## ◆ VirtBaseHelper()

bool clang::interp::VirtBaseHelper | ( | InterpState & | S,
|  | CodePtr | OpPC,
|  | const RecordDecl * | Decl,
|  | const Pointer & | Ptr
| ) |  |
| inline

Definition at line 583 of file Interp.h.

References clang::interp::Pointer::atField(), clang::interp::Pointer::getBase(), clang::interp::Pointer::getRecord(), clang::interp::Record::getVirtualBase(), clang::interp::Pointer::isBaseClass(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by GetPtrThisVirtBase(), and GetPtrVirtBase().

## ◆ Zero()

template<PrimType Name, class T = typename PrimConv<Name>::T>

bool clang::interp::Zero | ( | InterpState & | S,
|  | CodePtr | OpPC
| ) |  |

Definition at line 812 of file Interp.h.

References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

Referenced by applyBitwiseConstraints(), clang::ento::RangedConstraintManager::assumeSym(), clang::ento::RangedConstraintManager::assumeSymUnsupported(), clang::ento::CreateRangeConstraintManager(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EmitCheckedMixedSignMultiply(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitSignBit(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), EmitX86Abs(), EmitX86ConvertToMask(), EvaluateComplex(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCFString(), clang::CodeGen::CGCXXABI::getVirtualFunctionPrologueThisAdjustment(), clang::ento::SMTConv::getZeroExpr(), clang::ReturnAdjustment::VirtualAdjustment::isEmpty(), clang::ThisAdjustment::VirtualAdjustment::isEmpty(), and clang::ento::ExprEngine::VisitLogicalExpr().