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

Classes

class  Boolean
 Wrapper around boolean types. More...
 
class  ByteCodeEmitter
 An emitter which links the program to bytecode for later use. More...
 
class  DeclScope
 Scope used to handle temporaries in toplevel variable declarations. More...
 
class  OptionScope
 Scope used to handle initialization methods. More...
 
class  LocalScope
 Generic scope for local variables. More...
 
class  DestructorScope
 Emits the destructors of the variables of. More...
 
class  VariableScope
 Scope chain managing the variable lifetimes. More...
 
class  ArrayIndexScope
 
class  SourceLocScope
 
class  ByteCodeExprGen
 Compilation context for expressions. More...
 
class  AutoScope
 Like a regular LocalScope, except that the destructors of all local variables are automatically emitted when the AutoScope is destroyed. More...
 
class  BlockScope
 Scope for storage declared in a compound statement. More...
 
class  ExprScope
 
class  LabelScope
 Scope managing label targets. More...
 
class  LoopScope
 Sets the context for break/continue statements. More...
 
class  SwitchScope
 
class  ByteCodeStmtGen
 Compilation context for statements. More...
 
struct  ParamOffset
 
class  Context
 Holds all information required to evaluate constexpr code in a module. More...
 
struct  InlineDescriptor
 Inline descriptor embedded in structures and arrays. More...
 
struct  Descriptor
 Describes a memory block created by an allocation site. More...
 
struct  InitMap
 Bitfield tracking the initialisation status of elements of primitive arrays. More...
 
class  EvalEmitter
 An emitter which evaluates opcodes as they are emitted. More...
 
class  EvaluationResult
 Defines the result of an evaluation. More...
 
class  Floating
 
class  Frame
 Base class for stack frames, shared between VM and walker. More...
 
class  Scope
 Describes a scope block. More...
 
class  Function
 Bytecode function. More...
 
class  FunctionPointer
 
class  IntegralAP
 
struct  Repr
 
struct  Repr< 8, false >
 
struct  Repr< 16, false >
 
struct  Repr< 32, false >
 
struct  Repr< 64, false >
 
struct  Repr< 8, true >
 
struct  Repr< 16, true >
 
struct  Repr< 32, true >
 
struct  Repr< 64, true >
 
class  Integral
 Wrapper around numeric types. More...
 
class  Block
 A memory block, either on the stack or in the heap. More...
 
class  DeadBlock
 Descriptor for a dead block. More...
 
class  InterpFrame
 Frame storing local variables. More...
 
class  InterpStack
 Stack frame storing temporaries and parameters. More...
 
class  InterpState
 Interpreter context. More...
 
struct  BlockPointer
 
struct  IntPointer
 
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_Sint8 >
 
struct  PrimConv< PT_Uint8 >
 
struct  PrimConv< PT_Sint16 >
 
struct  PrimConv< PT_Uint16 >
 
struct  PrimConv< PT_Sint32 >
 
struct  PrimConv< PT_Uint32 >
 
struct  PrimConv< PT_Sint64 >
 
struct  PrimConv< PT_Uint64 >
 
struct  PrimConv< PT_IntAP >
 
struct  PrimConv< PT_IntAPS >
 
struct  PrimConv< PT_Float >
 
struct  PrimConv< PT_Bool >
 
struct  PrimConv< PT_Ptr >
 
struct  PrimConv< PT_FnPtr >
 
class  Program
 The program contains and links the bytecode for all functions. More...
 
class  Record
 Structure/Class descriptor. More...
 
class  CodePtr
 Pointer into the code segment. 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...
 

Typedefs

using DeclTy = unsigned llvm::PointerUnion< const Decl *, const Expr * >
 
using InitMapPtr = std::optional< std::pair< bool, std::shared_ptr< InitMap > >>
 
using BlockCtorFn = void(*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc)
 Invoked whenever a block is created. More...
 
using BlockDtorFn = void(*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc)
 Invoked when a block is destroyed. More...
 
using BlockMoveFn = void(*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc)
 Invoked when a block with pointers referencing it goes out of scope. More...
 
using APFloat = llvm::APFloat
 
using APSInt = llvm::APSInt
 
using APInt = llvm::APInt
 
using CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
 
using SourceMap = std::vector< std::pair< unsigned, SourceInfo > >
 

Enumerations

enum class  ArithOp { Add , Sub }
 
enum class  PushVal : bool { No , Yes }
 
enum class  IncDecOp { Inc , Dec }
 
enum  Opcode : uint32_t
 
enum class  Storage { Block , Int }
 
enum  PrimType : unsigned {
  PT_Sint8 = 0 , PT_Uint8 = 1 , PT_Sint16 = 2 , PT_Uint16 = 3 ,
  PT_Sint32 = 4 , PT_Uint32 = 5 , PT_Sint64 = 6 , PT_Uint64 = 7 ,
  PT_IntAP = 8 , PT_IntAPS = 9 , PT_Bool = 10 , PT_Float = 11 ,
  PT_Ptr = 12 , PT_FnPtr = 13
}
 Enumeration of the primitive types of the VM. More...
 
enum class  CastKind : uint8_t { Reinterpret , Atomic }
 

Functions

llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Boolean &B)
 
static void DiagnoseUninitializedSubobject (InterpState &S, SourceLocation Loc, const FieldDecl *SubObjDecl)
 
static bool CheckFieldsInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const Record *R)
 
static bool CheckArrayInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const ConstantArrayType *CAT)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, Floating F)
 
Floating getSwappedBytes (Floating F)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, FunctionPointer FP)
 
template<unsigned Bits, bool Signed>
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I)
 
template<bool Signed>
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, IntegralAP< Signed > I)
 
template<bool Signed>
IntegralAP< Signed > getSwappedBytes (IntegralAP< Signed > F)
 
static void popArg (InterpState &S, const Expr *Arg)
 
void cleanupAfterFunctionCall (InterpState &S, CodePtr OpPC)
 
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 accessible. More...
 
bool CheckConstant (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 Checks if the Descriptor is of a constexpr or const global variable. More...
 
static bool CheckConstant (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
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 CheckSubobject (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if Ptr is a one-past-the-end pointer. 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 CheckInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
bool CheckGlobalInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Check if a global variable is initialized. 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, const Function *F)
 Checks if a method can be called. More...
 
bool CheckCallDepth (InterpState &S, CodePtr OpPC)
 Checks if calling the currently active function would exceed the allowed call depth. 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 CheckFloatResult (InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status)
 Checks if the result of a floating-point operation is valid in the current context. More...
 
bool CheckDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR)
 We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics. More...
 
bool CheckDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is a dummy pointer. More...
 
bool CheckNonNullArgs (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize)
 Checks if all the arguments annotated as 'nonnull' are in fact not null. More...
 
bool Interpret (InterpState &S, APValue &Result)
 Interpreter entry point. More...
 
template<typename T >
bool ReturnValue (const T &V, APValue &R)
 Convert a value to an APValue. More...
 
bool SetThreeWayComparisonField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const APSInt &IntValue)
 Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type. More...
 
bool DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest)
 Copy the contents of Src into Dest. More...
 
template<typename LT , typename RT >
bool CheckShift (InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, unsigned Bits)
 Checks if the shift operation is legal. More...
 
template<typename T >
bool CheckDivRem (InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS)
 Checks if Div/Rem operation on LHS and RHS is valid. More...
 
bool InterpretBuiltin (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call)
 Interpret a builtin function. More...
 
bool InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, llvm::ArrayRef< int64_t > ArrayIndices, int64_t &Result)
 Interpret an offsetof operation. More...
 
bool Invalid (InterpState &S, CodePtr OpPC)
 Just emit a diagnostic. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Ret (InterpState &S, CodePtr &PC, APValue &Result)
 
bool RetVoid (InterpState &S, CodePtr &PC, APValue &Result)
 
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)
 
bool Addf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Sub (InterpState &S, CodePtr OpPC)
 
bool Subf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Mul (InterpState &S, CodePtr OpPC)
 
bool Mulf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitAnd (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitOr (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitXor (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Rem (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Div (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack. More...
 
bool Divf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Inv (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Neg (InterpState &S, CodePtr OpPC)
 
template<typename T , IncDecOp Op, PushVal DoPush>
bool IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Inc (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool IncPop (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Dec (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool DecPop (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer More...
 
template<IncDecOp Op, PushVal DoPush>
bool IncDecFloatHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, llvm::RoundingMode RM)
 
bool Incf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool IncfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool Decf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool DecfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Comp (InterpState &S, CodePtr OpPC)
 1) Pops the value from the stack. More...
 
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< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 Function pointers cannot be compared in an ordered way. More...
 
template<>
bool CmpHelperEQ< FunctionPointer > (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 CMP3 (InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo)
 
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)
 1) Pops the value from the stack. More...
 
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)
 1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack More...
 
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)
 1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack More...
 
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 GetGlobalUnchecked (InterpState &S, CodePtr OpPC, uint32_t I)
 Same as GetGlobal, but without the checks. More...
 
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 InitGlobalTemp (InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp)
 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that More...
 
bool InitGlobalTempComp (InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp)
 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that More...
 
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, uint32_t FieldOffset)
 
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)
 1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack More...
 
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)
 1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack More...
 
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 GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool FinishInitPop (InterpState &S, CodePtr OpPC)
 
bool FinishInit (InterpState &S, CodePtr OpPC)
 
bool Dump (InterpState &S, CodePtr OpPC)
 
bool VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)
 
bool GetPtrVirtBasePop (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 Init (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)
 1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx)
 The same as InitElem, but pops the pointer as well. More...
 
bool Memcpy (InterpState &S, CodePtr OpPC)
 
template<class T , ArithOp Op>
bool OffsetHelper (InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr)
 
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)
 
template<ArithOp Op>
static bool IncDecPtrHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
static bool IncPtr (InterpState &S, CodePtr OpPC)
 
static bool DecPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SubPtr (InterpState &S, CodePtr OpPC)
 1) Pops a Pointer from the stack. More...
 
bool Destroy (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType TIn, PrimType TOut>
bool Cast (InterpState &S, CodePtr OpPC)
 
bool CastFP (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM)
 1) Pops a Floating from the stack. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be. More...
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastFloatingIntegral (InterpState &S, CodePtr OpPC)
 
static bool CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
static bool CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastPointerIntegral (InterpState &S, CodePtr OpPC)
 
static bool CastPointerIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
static bool CastPointerIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Zero (InterpState &S, CodePtr OpPC)
 
static bool ZeroIntAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
static bool ZeroIntAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Null (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 
bool This (InterpState &S, CodePtr OpPC)
 
bool RVOPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType NameL, PrimType NameR>
bool Shr (InterpState &S, CodePtr OpPC)
 
template<PrimType NameL, PrimType NameR>
bool Shl (InterpState &S, CodePtr OpPC)
 
bool NoRet (InterpState &S, CodePtr OpPC)
 
bool NarrowPtr (InterpState &S, CodePtr OpPC)
 
bool ExpandPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPtrPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElem (InterpState &S, CodePtr OpPC, uint32_t Index)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPop (InterpState &S, CodePtr OpPC, uint32_t Index)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CopyArray (InterpState &S, CodePtr OpPC, uint32_t SrcIndex, uint32_t DestIndex, uint32_t Size)
 
bool ArrayDecay (InterpState &S, CodePtr OpPC)
 Just takes a pointer and checks if it's an incomplete array type. More...
 
bool CallVar (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool Call (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool CallVirt (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool CallBI (InterpState &S, CodePtr &PC, const Function *Func, const CallExpr *CE)
 
bool CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE)
 
bool GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetIntPtr (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 
bool Error (InterpState &S, CodePtr OpPC)
 Do nothing and just abort execution. More...
 
bool InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind)
 Same here, but only for casts. More...
 
bool InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR)
 
bool Assume (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool OffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CheckNonNullArg (InterpState &S, CodePtr OpPC)
 
template<PrimType TIn, PrimType TOut>
bool DecayPtr (InterpState &S, CodePtr OpPC)
 OldPtr -> Integer -> NewPtr. More...
 
template<typename T >
T ReadArg (InterpState &S, CodePtr &OpPC)
 
template<>
Floating ReadArg< Floating > (InterpState &S, CodePtr &OpPC)
 
template<>
IntegralAP< falseReadArg< IntegralAP< false > > (InterpState &S, CodePtr &OpPC)
 
template<>
IntegralAP< trueReadArg< IntegralAP< true > > (InterpState &S, CodePtr &OpPC)
 
static unsigned callArgSize (const InterpState &S, const CallExpr *C)
 
template<typename T >
static T getParam (const InterpFrame *Frame, unsigned Index)
 
PrimType getIntPrimType (const InterpState &S)
 
PrimType getLongPrimType (const InterpState &S)
 
static APSInt peekToAPSInt (InterpStack &Stk, PrimType T, size_t Offset=0)
 Peek an integer value from the stack into an APSInt. More...
 
static void pushInteger (InterpState &S, const APSInt &Val, QualType QT)
 Pushes Val on the stack as the type given by QT. More...
 
template<typename T >
static void pushInteger (InterpState &S, T Val, QualType QT)
 
static void assignInteger (Pointer &Dest, PrimType ValueT, const APSInt &Value)
 
static bool retPrimValue (InterpState &S, CodePtr OpPC, APValue &Result, std::optional< PrimType > &T)
 
static bool interp__builtin_is_constant_evaluated (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
 
static bool interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
 
static bool interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
 
static bool interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool Signaling)
 
static bool interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func)
 
static bool interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc. More...
 
static bool interp__builtin_issignaling (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool CheckSign, const CallExpr *Call)
 
static bool interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 First parameter to __builtin_isfpclass is the floating value, the second one is an integral value. More...
 
static bool interp__builtin_fpclassify (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Five int values followed by one floating value. More...
 
static bool interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func)
 
static bool interp__builtin_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_parity (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_clrsb (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_bitreverse (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_classify_type (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_expect (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_rotate (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call, bool Right)
 rotateleft(value, amount) More...
 
static bool interp__builtin_ffs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_addressof (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_move (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_eh_return_data_regno (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool noopPointer (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Just takes the first Argument to the call and puts it on the stack. More...
 
static bool interp__builtin_overflowop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_carryop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Three integral values followed by a pointer (lhs, rhs, carry, carryOut). More...
 
static bool interp__builtin_clz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ctz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_bswap (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_atomic_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) bool __c11_atomic_is_lock_free(size_t) More...
 
static bool interp__builtin_complex (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 __builtin_complex(Float A, float B); More...
 
static bool interp__builtin_is_aligned_up_down (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 __builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer. More...
 
static bool interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
llvm::BitVector collectNonNullArgs (const FunctionDecl *F, const llvm::ArrayRef< const Expr * > &Args)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Pointer &P)
 
template<typename T >
ComparisonCategoryResult Compare (const T &X, const T &Y)
 Helper to compare two comparable types. More...
 
size_t primSize (PrimType Type)
 Returns the size of a primitive type in bytes. More...
 
constexpr bool isPtrType (PrimType T)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, interp::CastKind CK)
 
constexpr bool isIntegralType (PrimType T)
 
constexpr size_t align (size_t Size)
 Aligns a size to the pointer alignment. More...
 
constexpr bool aligned (uintptr_t Value)
 
static bool aligned (const void *P)
 

Typedef Documentation

◆ APFloat

using clang::interp::APFloat = typedef llvm::APFloat

Definition at line 23 of file Floating.h.

◆ APInt

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

Definition at line 29 of file Integral.h.

◆ APSInt

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

Definition at line 24 of file Floating.h.

◆ BlockCtorFn

using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const 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, std::byte *FieldPtr, const Descriptor *FieldDesc)

Invoked when a block is destroyed.

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

Definition at line 39 of file Descriptor.h.

◆ BlockMoveFn

using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const 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 46 of file Descriptor.h.

◆ CompareFn

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

Definition at line 724 of file Interp.h.

◆ DeclTy

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

Definition at line 27 of file Descriptor.h.

◆ InitMapPtr

using clang::interp::InitMapPtr = typedef std::optional<std::pair<bool, std::shared_ptr<InitMap> >>

Definition at line 28 of file Descriptor.h.

◆ SourceMap

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

Definition at line 91 of file Source.h.

Enumeration Type Documentation

◆ ArithOp

Enumerator
Add 
Sub 

Definition at line 209 of file Interp.h.

◆ CastKind

enum clang::interp::CastKind : uint8_t
strong
Enumerator
Reinterpret 
Atomic 

Definition at line 53 of file PrimType.h.

◆ IncDecOp

Enumerator
Inc 
Dec 

Definition at line 526 of file Interp.h.

◆ Opcode

enum clang::interp::Opcode : uint32_t

Definition at line 21 of file Opcode.h.

◆ PrimType

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_IntAP 
PT_IntAPS 
PT_Bool 
PT_Float 
PT_Ptr 
PT_FnPtr 

Definition at line 32 of file PrimType.h.

◆ PushVal

Enumerator
No 
Yes 

Definition at line 522 of file Interp.h.

◆ Storage

Enumerator
Block 
Int 

Definition at line 49 of file Pointer.h.

Function Documentation

◆ Add()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Add ( InterpState S,
CodePtr  OpPC 
)

Definition at line 313 of file Interp.h.

Referenced by EmitAtomicIncrementValue(), and EmitAtomicOp().

◆ Addf()

bool clang::interp::Addf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 320 of file Interp.h.

◆ AddOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::AddOffset ( InterpState S,
CodePtr  OpPC 
)

◆ 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 275 of file Interp.h.

◆ align()

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

◆ aligned() [1/2]

static bool clang::interp::aligned ( const void *  P)
inlinestatic

Definition at line 106 of file PrimType.h.

References aligned(), and P.

◆ aligned() [2/2]

constexpr bool clang::interp::aligned ( uintptr_t  Value)
constexpr

◆ ArrayDecay()

bool clang::interp::ArrayDecay ( InterpState S,
CodePtr  OpPC 
)
inline

Just takes a pointer and checks if it's an incomplete array type.

Definition at line 2107 of file Interp.h.

◆ ArrayElem()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::ArrayElem ( InterpState S,
CodePtr  OpPC,
uint32_t  Index 
)
inline

Definition at line 2066 of file Interp.h.

◆ ArrayElemPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::ArrayElemPop ( InterpState S,
CodePtr  OpPC,
uint32_t  Index 
)
inline

Definition at line 2077 of file Interp.h.

◆ ArrayElemPtr()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::ArrayElemPtr ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 2034 of file Interp.h.

◆ ArrayElemPtrPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::ArrayElemPtrPop ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 2050 of file Interp.h.

◆ assignInteger()

static void clang::interp::assignInteger ( Pointer Dest,
PrimType  ValueT,
const APSInt Value 
)
static

◆ Assume()

bool clang::interp::Assume ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 2361 of file Interp.h.

Referenced by clang::ento::ConstraintManager::assumeDualImpl().

◆ BitAnd()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::BitAnd ( InterpState S,
CodePtr  OpPC 
)

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS & RHS' on the stack

Definition at line 369 of file Interp.h.

◆ BitOr()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::BitOr ( InterpState S,
CodePtr  OpPC 
)

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS | RHS' on the stack

Definition at line 386 of file Interp.h.

◆ BitXor()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::BitXor ( InterpState S,
CodePtr  OpPC 
)

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS ^ RHS' on the stack

Definition at line 403 of file Interp.h.

◆ Call()

bool clang::interp::Call ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

◆ callArgSize()

static unsigned clang::interp::callArgSize ( const InterpState S,
const CallExpr C 
)
static

Definition at line 20 of file InterpBuiltin.cpp.

◆ CallBI()

bool clang::interp::CallBI ( InterpState S,
CodePtr PC,
const Function Func,
const CallExpr CE 
)
inline

Definition at line 2271 of file Interp.h.

◆ CallPtr()

bool clang::interp::CallPtr ( InterpState S,
CodePtr  OpPC,
uint32_t  ArgSize,
const CallExpr CE 
)
inline

Definition at line 2286 of file Interp.h.

◆ CallVar()

bool clang::interp::CallVar ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

Definition at line 2129 of file Interp.h.

◆ CallVirt()

bool clang::interp::CallVirt ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

Definition at line 2228 of file Interp.h.

◆ Cast()

template<PrimType TIn, PrimType TOut>
bool clang::interp::Cast ( InterpState S,
CodePtr  OpPC 
)

◆ CastAP()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)

Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be.

Definition at line 1737 of file Interp.h.

◆ CastAPS()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)

Definition at line 1744 of file Interp.h.

◆ CastFloatingIntegral()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastFloatingIntegral ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1765 of file Interp.h.

◆ CastFloatingIntegralAP()

static bool clang::interp::CastFloatingIntegralAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1794 of file Interp.h.

◆ CastFloatingIntegralAPS()

static bool clang::interp::CastFloatingIntegralAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1814 of file Interp.h.

◆ CastFP()

bool clang::interp::CastFP ( InterpState S,
CodePtr  OpPC,
const llvm::fltSemantics *  Sem,
llvm::RoundingMode  RM 
)
inline

1) Pops a Floating from the stack.

2) Pushes a new floating on the stack that uses the given semantics.

Definition at line 1726 of file Interp.h.

◆ CastIntegralFloating()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastIntegralFloating ( InterpState S,
CodePtr  OpPC,
const llvm::fltSemantics *  Sem,
llvm::RoundingMode  RM 
)

Definition at line 1751 of file Interp.h.

◆ CastPointerIntegral()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastPointerIntegral ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1835 of file Interp.h.

◆ CastPointerIntegralAP()

static bool clang::interp::CastPointerIntegralAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1846 of file Interp.h.

◆ CastPointerIntegralAPS()

static bool clang::interp::CastPointerIntegralAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1859 of file Interp.h.

◆ CheckArray()

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

Checks if the array is offsetable.

Definition at line 261 of file Interp.cpp.

◆ CheckArrayInitialized()

static bool clang::interp::CheckArrayInitialized ( InterpState S,
SourceLocation  Loc,
const Pointer BasePtr,
const ConstantArrayType CAT 
)
static

Definition at line 65 of file EvaluationResult.cpp.

◆ CheckCallable()

bool clang::interp::CheckCallable ( InterpState S,
CodePtr  OpPC,
const Function F 
)

Checks if a method can be called.

Definition at line 511 of file Interp.cpp.

◆ CheckCallDepth()

bool clang::interp::CheckCallDepth ( InterpState S,
CodePtr  OpPC 
)

Checks if calling the currently active function would exceed the allowed call depth.

Definition at line 571 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 376 of file Interp.cpp.

◆ CheckConstant() [1/2]

bool clang::interp::CheckConstant ( InterpState S,
CodePtr  OpPC,
const Descriptor Desc 
)

Checks if the Descriptor is of a constexpr or const global variable.

Definition at line 299 of file Interp.cpp.

◆ CheckConstant() [2/2]

static bool clang::interp::CheckConstant ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)
static

Definition at line 333 of file Interp.cpp.

◆ CheckDeclRef()

bool clang::interp::CheckDeclRef ( InterpState S,
CodePtr  OpPC,
const DeclRefExpr DR 
)

We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics.

Checks why the given DeclRefExpr is invalid.

Definition at line 658 of file Interp.cpp.

◆ CheckDivRem()

template<typename T >
bool clang::interp::CheckDivRem ( InterpState S,
CodePtr  OpPC,
const T LHS,
const T RHS 
)

Checks if Div/Rem operation on LHS and RHS is valid.

Definition at line 167 of file Interp.h.

◆ CheckDummy()

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

Checks if a pointer is a dummy pointer.

Definition at line 663 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 247 of file Interp.cpp.

◆ CheckFieldsInitialized()

static bool clang::interp::CheckFieldsInitialized ( InterpState S,
SourceLocation  Loc,
const Pointer BasePtr,
const Record R 
)
static

Definition at line 95 of file EvaluationResult.cpp.

◆ CheckFloatResult()

bool clang::interp::CheckFloatResult ( InterpState S,
CodePtr  OpPC,
const Floating Result,
APFloat::opStatus  Status 
)

Checks if the result of a floating-point operation is valid in the current context.

Definition at line 609 of file Interp.cpp.

◆ CheckGlobalInitialized()

bool clang::interp::CheckGlobalInitialized ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Check if a global variable is initialized.

Definition at line 437 of file Interp.cpp.

Referenced by clang::interp::Context::evaluateAsInitializer().

◆ CheckInit()

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

Checks if a value can be initialized.

Definition at line 503 of file Interp.cpp.

◆ CheckInitialized()

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

Definition at line 411 of file Interp.cpp.

◆ 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 493 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 accessible.

Definition at line 269 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 454 of file Interp.cpp.

◆ CheckMutable()

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

Checks if a pointer points to a mutable field.

Definition at line 398 of file Interp.cpp.

◆ CheckNonNullArg()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CheckNonNullArg ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 2389 of file Interp.h.

◆ CheckNonNullArgs()

bool clang::interp::CheckNonNullArgs ( InterpState S,
CodePtr  OpPC,
const Function F,
const CallExpr CE,
unsigned  ArgSize 
)

Checks if all the arguments annotated as 'nonnull' are in fact not null.

Definition at line 684 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 339 of file Interp.cpp.

◆ CheckPure()

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

Checks if a method is pure virtual.

Definition at line 600 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 348 of file Interp.cpp.

◆ 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 357 of file Interp.cpp.

◆ CheckShift()

template<typename LT , typename RT >
bool clang::interp::CheckShift ( InterpState S,
CodePtr  OpPC,
const LT LHS,
const RT &  RHS,
unsigned  Bits 
)

Checks if the shift operation is legal.

Definition at line 131 of file Interp.h.

◆ 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 477 of file Interp.cpp.

◆ CheckSubobject()

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

Checks if Ptr is a one-past-the-end pointer.

Definition at line 366 of file Interp.cpp.

◆ CheckThis()

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

Checks the 'this' pointer.

Definition at line 582 of file Interp.cpp.

◆ cleanupAfterFunctionCall()

void clang::interp::cleanupAfterFunctionCall ( InterpState S,
CodePtr  OpPC 
)

Definition at line 197 of file Interp.cpp.

◆ CMP3()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CMP3 ( InterpState S,
CodePtr  OpPC,
const ComparisonCategoryInfo CmpInfo 
)

Definition at line 845 of file Interp.h.

◆ CmpHelper()

template<typename T >
bool clang::interp::CmpHelper ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)

Definition at line 727 of file Interp.h.

◆ CmpHelper< FunctionPointer >()

template<>
bool clang::interp::CmpHelper< FunctionPointer > ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)
inline

Function pointers cannot be compared in an ordered way.

Definition at line 742 of file Interp.h.

◆ CmpHelper< Pointer >()

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

Definition at line 775 of file Interp.h.

◆ CmpHelperEQ()

template<typename T >
bool clang::interp::CmpHelperEQ ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)

Definition at line 736 of file Interp.h.

◆ CmpHelperEQ< FunctionPointer >()

template<>
bool clang::interp::CmpHelperEQ< FunctionPointer > ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)
inline

Definition at line 755 of file Interp.h.

◆ CmpHelperEQ< Pointer >()

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

Definition at line 795 of file Interp.h.

◆ collectNonNullArgs()

llvm::BitVector clang::interp::collectNonNullArgs ( const FunctionDecl F,
const llvm::ArrayRef< const Expr * > &  Args 
)

◆ Comp()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Comp ( InterpState S,
CodePtr  OpPC 
)

1) Pops the value from the stack.

2) Pushes the bitwise complemented value on the stack (~V).

Definition at line 709 of file Interp.h.

Referenced by clang::ExtVectorElementExpr::containsDuplicateElements(), clang::ento::PathDiagnosticConsumer::FlushDiagnostics(), and clang::ExtVectorElementExpr::getEncodedElementAccess().

◆ Compare()

template<typename T >
ComparisonCategoryResult clang::interp::Compare ( const T X,
const T Y 
)

◆ Const()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Const ( InterpState S,
CodePtr  OpPC,
const T Arg 
)

Definition at line 940 of file Interp.h.

◆ CopyArray()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CopyArray ( InterpState S,
CodePtr  OpPC,
uint32_t  SrcIndex,
uint32_t  DestIndex,
uint32_t  Size 
)
inline

Definition at line 2088 of file Interp.h.

◆ Dec()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Dec ( InterpState S,
CodePtr  OpPC 
)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack.

Definition at line 619 of file Interp.h.

◆ DecayPtr()

template<PrimType TIn, PrimType TOut>
bool clang::interp::DecayPtr ( InterpState S,
CodePtr  OpPC 
)
inline

OldPtr -> Integer -> NewPtr.

Definition at line 2402 of file Interp.h.

◆ Decf()

bool clang::interp::Decf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 683 of file Interp.h.

◆ DecfPop()

bool clang::interp::DecfPop ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 695 of file Interp.h.

◆ DecPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::DecPop ( InterpState S,
CodePtr  OpPC 
)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer

Definition at line 633 of file Interp.h.

◆ DecPtr()

static bool clang::interp::DecPtr ( InterpState S,
CodePtr  OpPC 
)
inlinestatic

Definition at line 1667 of file Interp.h.

◆ Destroy()

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

Definition at line 1708 of file Interp.h.

Referenced by pushTemporaryCleanup().

◆ DiagnoseUninitializedSubobject()

static void clang::interp::DiagnoseUninitializedSubobject ( InterpState S,
SourceLocation  Loc,
const FieldDecl SubObjDecl 
)
static

Definition at line 53 of file EvaluationResult.cpp.

◆ Div()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Div ( InterpState S,
CodePtr  OpPC 
)

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS / RHS' on the stack

Definition at line 440 of file Interp.h.

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

◆ Divf()

bool clang::interp::Divf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 456 of file Interp.h.

◆ DoMemcpy()

bool clang::interp::DoMemcpy ( InterpState S,
CodePtr  OpPC,
const Pointer Src,
Pointer Dest 
)

Copy the contents of Src into Dest.

Definition at line 1531 of file InterpBuiltin.cpp.

◆ Dump()

bool clang::interp::Dump ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 1355 of file Interp.h.

Referenced by clang::CreateASTDumper(), and clang::Module::print().

◆ Dup()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Dup ( InterpState S,
CodePtr  OpPC 
)

Definition at line 924 of file Interp.h.

◆ EQ()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::EQ ( InterpState S,
CodePtr  OpPC 
)

◆ Error()

bool clang::interp::Error ( InterpState S,
CodePtr  OpPC 
)
inline

Do nothing and just abort execution.

Definition at line 2342 of file Interp.h.

◆ ExpandPtr()

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

Definition at line 2019 of file Interp.h.

◆ FinishInit()

bool clang::interp::FinishInit ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 1346 of file Interp.h.

◆ FinishInitPop()

bool clang::interp::FinishInitPop ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 1337 of file Interp.h.

◆ GE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GE ( InterpState S,
CodePtr  OpPC 
)

Definition at line 898 of file Interp.h.

Referenced by clang::Expr::isNullPointerConstant().

◆ GetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack

Definition at line 985 of file Interp.h.

◆ GetFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetFieldPop ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack

Definition at line 1017 of file Interp.h.

◆ GetFnPtr()

bool clang::interp::GetFnPtr ( InterpState S,
CodePtr  OpPC,
const Function Func 
)
inline

Definition at line 2318 of file Interp.h.

◆ GetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1060 of file Interp.h.

◆ GetGlobalUnchecked()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetGlobalUnchecked ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Same as GetGlobal, but without the checks.

Definition at line 1078 of file Interp.h.

◆ getIntPrimType()

PrimType clang::interp::getIntPrimType ( const InterpState S)

Definition at line 37 of file InterpBuiltin.cpp.

◆ GetIntPtr()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetIntPtr ( InterpState S,
CodePtr  OpPC,
const Descriptor Desc 
)
inline

Definition at line 2325 of file Interp.h.

◆ GetLocal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetLocal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 950 of file Interp.h.

◆ getLongPrimType()

PrimType clang::interp::getLongPrimType ( const InterpState S)

Definition at line 48 of file InterpBuiltin.cpp.

◆ getParam()

template<typename T >
static T clang::interp::getParam ( const InterpFrame Frame,
unsigned  Index 
)
static

Definition at line 31 of file InterpBuiltin.cpp.

Referenced by clang::ConceptDecl::isTypeConcept().

◆ GetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetParam ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 968 of file Interp.h.

◆ GetPtrActiveField()

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

Definition at line 1271 of file Interp.h.

◆ GetPtrActiveThisField()

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

Definition at line 1284 of file Interp.h.

◆ GetPtrBase()

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

Definition at line 1307 of file Interp.h.

◆ GetPtrBasePop()

bool clang::interp::GetPtrBasePop ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 1317 of file Interp.h.

◆ GetPtrDerivedPop()

bool clang::interp::GetPtrDerivedPop ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 1297 of file Interp.h.

◆ GetPtrField()

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

1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack

Definition at line 1238 of file Interp.h.

◆ GetPtrGlobal()

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

Definition at line 1231 of file Interp.h.

◆ GetPtrLocal()

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

Definition at line 1218 of file Interp.h.

◆ GetPtrParam()

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

Definition at line 1223 of file Interp.h.

◆ GetPtrThisBase()

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

Definition at line 1327 of file Interp.h.

◆ GetPtrThisField()

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

Definition at line 1261 of file Interp.h.

◆ GetPtrThisVirtBase()

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

Definition at line 1380 of file Interp.h.

◆ GetPtrVirtBasePop()

bool clang::interp::GetPtrVirtBasePop ( InterpState S,
CodePtr  OpPC,
const RecordDecl D 
)
inline

Definition at line 1371 of file Interp.h.

◆ getSwappedBytes() [1/2]

Floating clang::interp::getSwappedBytes ( Floating  F)

Definition at line 19 of file Floating.cpp.

◆ getSwappedBytes() [2/2]

template<bool Signed>
IntegralAP<Signed> clang::interp::getSwappedBytes ( IntegralAP< Signed >  F)

Definition at line 321 of file IntegralAP.h.

◆ GetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1031 of file Interp.h.

◆ GT()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GT ( InterpState S,
CodePtr  OpPC 
)

Definition at line 891 of file Interp.h.

◆ Inc()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Inc ( InterpState S,
CodePtr  OpPC 
)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack.

Definition at line 590 of file Interp.h.

Referenced by clang::OMPLoopDirective::setInc().

◆ IncDecFloatHelper()

template<IncDecOp Op, PushVal DoPush>
bool clang::interp::IncDecFloatHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
llvm::RoundingMode  RM 
)

Definition at line 644 of file Interp.h.

◆ IncDecHelper()

template<typename T , IncDecOp Op, PushVal DoPush>
bool clang::interp::IncDecHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Definition at line 532 of file Interp.h.

◆ IncDecPtrHelper()

template<ArithOp Op>
static bool clang::interp::IncDecPtrHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)
inlinestatic

Definition at line 1634 of file Interp.h.

◆ Incf()

bool clang::interp::Incf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 663 of file Interp.h.

◆ IncfPop()

bool clang::interp::IncfPop ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 673 of file Interp.h.

◆ IncPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::IncPop ( InterpState S,
CodePtr  OpPC 
)

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer

Definition at line 604 of file Interp.h.

◆ IncPtr()

static bool clang::interp::IncPtr ( InterpState S,
CodePtr  OpPC 
)
inlinestatic

Definition at line 1658 of file Interp.h.

◆ Init()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Init ( InterpState S,
CodePtr  OpPC 
)

◆ 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 1193 of file Interp.h.

◆ InitElem()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElem ( InterpState S,
CodePtr  OpPC,
uint32_t  Idx 
)

1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack.

Definition at line 1499 of file Interp.h.

◆ InitElemPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElemPop ( InterpState S,
CodePtr  OpPC,
uint32_t  Idx 
)

The same as InitElem, but pops the pointer as well.

Definition at line 1513 of file Interp.h.

◆ InitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack

Definition at line 1183 of file Interp.h.

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 1204 of file Interp.h.

◆ InitGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1091 of file Interp.h.

◆ InitGlobalTemp()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitGlobalTemp ( InterpState S,
CodePtr  OpPC,
uint32_t  I,
const LifetimeExtendedTemporaryDecl Temp 
)

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that

Definition at line 1102 of file Interp.h.

◆ InitGlobalTempComp()

bool clang::interp::InitGlobalTempComp ( InterpState S,
CodePtr  OpPC,
const LifetimeExtendedTemporaryDecl Temp 
)
inline

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that

Definition at line 1120 of file Interp.h.

◆ InitPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1485 of file Interp.h.

◆ InitThisBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisBitField ( InterpState S,
CodePtr  OpPC,
const Record::Field *  F,
uint32_t  FieldOffset 
)

Definition at line 1150 of file Interp.h.

◆ InitThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1135 of file Interp.h.

◆ InitThisFieldActive()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisFieldActive ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1166 of file Interp.h.

◆ InRange()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InRange ( InterpState S,
CodePtr  OpPC 
)

◆ interp__builtin_addressof()

static bool clang::interp::interp__builtin_addressof ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 607 of file InterpBuiltin.cpp.

◆ interp__builtin_atomic_lock_free()

static bool clang::interp::interp__builtin_atomic_lock_free ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) bool __c11_atomic_is_lock_free(size_t)

Definition at line 898 of file InterpBuiltin.cpp.

◆ interp__builtin_bitreverse()

static bool clang::interp::interp__builtin_bitreverse ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 527 of file InterpBuiltin.cpp.

◆ interp__builtin_bswap()

static bool clang::interp::interp__builtin_bswap ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 882 of file InterpBuiltin.cpp.

◆ interp__builtin_carryop()

static bool clang::interp::interp__builtin_carryop ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Three integral values followed by a pointer (lhs, rhs, carry, carryOut).

Definition at line 766 of file InterpBuiltin.cpp.

◆ interp__builtin_classify_type()

static bool clang::interp::interp__builtin_classify_type ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 537 of file InterpBuiltin.cpp.

◆ interp__builtin_clrsb()

static bool clang::interp::interp__builtin_clrsb ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 518 of file InterpBuiltin.cpp.

◆ interp__builtin_clz()

static bool clang::interp::interp__builtin_clz ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 827 of file InterpBuiltin.cpp.

◆ interp__builtin_complex()

static bool clang::interp::interp__builtin_complex ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

__builtin_complex(Float A, float B);

Definition at line 963 of file InterpBuiltin.cpp.

◆ interp__builtin_copysign()

static bool clang::interp::interp__builtin_copysign ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 309 of file InterpBuiltin.cpp.

◆ interp__builtin_ctz()

static bool clang::interp::interp__builtin_ctz ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 859 of file InterpBuiltin.cpp.

◆ interp__builtin_eh_return_data_regno()

static bool clang::interp::interp__builtin_eh_return_data_regno ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 637 of file InterpBuiltin.cpp.

◆ interp__builtin_expect()

static bool clang::interp::interp__builtin_expect ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 554 of file InterpBuiltin.cpp.

◆ interp__builtin_fabs()

static bool clang::interp::interp__builtin_fabs ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func 
)
static

Definition at line 490 of file InterpBuiltin.cpp.

◆ interp__builtin_ffs()

static bool clang::interp::interp__builtin_ffs ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 596 of file InterpBuiltin.cpp.

◆ interp__builtin_fmax()

static bool clang::interp::interp__builtin_fmax ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func 
)
static

Definition at line 341 of file InterpBuiltin.cpp.

◆ interp__builtin_fmin()

static bool clang::interp::interp__builtin_fmin ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 322 of file InterpBuiltin.cpp.

◆ interp__builtin_fpclassify()

static bool clang::interp::interp__builtin_fpclassify ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Five int values followed by one floating value.

Definition at line 452 of file InterpBuiltin.cpp.

◆ interp__builtin_inf()

static bool clang::interp::interp__builtin_inf ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 300 of file InterpBuiltin.cpp.

◆ interp__builtin_is_aligned_up_down()

static bool clang::interp::interp__builtin_is_aligned_up_down ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

__builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer.

The second parameter is the requested alignment as an integer.

Definition at line 986 of file InterpBuiltin.cpp.

◆ interp__builtin_is_constant_evaluated()

static bool clang::interp::interp__builtin_is_constant_evaluated ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const CallExpr Call 
)
static

Definition at line 133 of file InterpBuiltin.cpp.

◆ interp__builtin_isfinite()

static bool clang::interp::interp__builtin_isfinite ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Definition at line 396 of file InterpBuiltin.cpp.

◆ interp__builtin_isfpclass()

static bool clang::interp::interp__builtin_isfpclass ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.

Definition at line 435 of file InterpBuiltin.cpp.

◆ interp__builtin_isinf()

static bool clang::interp::interp__builtin_isinf ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
bool  CheckSign,
const CallExpr Call 
)
static

Definition at line 383 of file InterpBuiltin.cpp.

◆ interp__builtin_isnan()

static bool clang::interp::interp__builtin_isnan ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc.

But for us, that's all a Floating anyway.

Definition at line 364 of file InterpBuiltin.cpp.

◆ interp__builtin_isnormal()

static bool clang::interp::interp__builtin_isnormal ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Definition at line 405 of file InterpBuiltin.cpp.

◆ interp__builtin_issignaling()

static bool clang::interp::interp__builtin_issignaling ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Definition at line 373 of file InterpBuiltin.cpp.

◆ interp__builtin_issubnormal()

static bool clang::interp::interp__builtin_issubnormal ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Definition at line 414 of file InterpBuiltin.cpp.

◆ interp__builtin_iszero()

static bool clang::interp::interp__builtin_iszero ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
static

Definition at line 424 of file InterpBuiltin.cpp.

◆ interp__builtin_move()

static bool clang::interp::interp__builtin_move ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 626 of file InterpBuiltin.cpp.

◆ interp__builtin_nan()

static bool clang::interp::interp__builtin_nan ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
bool  Signaling 
)
static

Definition at line 239 of file InterpBuiltin.cpp.

◆ interp__builtin_os_log_format_buffer_size()

static bool clang::interp::interp__builtin_os_log_format_buffer_size ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 1092 of file InterpBuiltin.cpp.

◆ interp__builtin_overflowop()

static bool clang::interp::interp__builtin_overflowop ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 659 of file InterpBuiltin.cpp.

◆ interp__builtin_parity()

static bool clang::interp::interp__builtin_parity ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 509 of file InterpBuiltin.cpp.

◆ interp__builtin_popcount()

static bool clang::interp::interp__builtin_popcount ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 499 of file InterpBuiltin.cpp.

◆ interp__builtin_rotate()

static bool clang::interp::interp__builtin_rotate ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call,
bool  Right 
)
static

rotateleft(value, amount)

Definition at line 573 of file InterpBuiltin.cpp.

◆ interp__builtin_strcmp()

static bool clang::interp::interp__builtin_strcmp ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const CallExpr Call 
)
static

Definition at line 163 of file InterpBuiltin.cpp.

◆ interp__builtin_strlen()

static bool clang::interp::interp__builtin_strlen ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const CallExpr Call 
)
static

Definition at line 206 of file InterpBuiltin.cpp.

◆ Interpret()

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

Interpreter entry point.

Definition at line 706 of file Interp.cpp.

◆ InterpretBuiltin()

bool clang::interp::InterpretBuiltin ( InterpState S,
CodePtr  OpPC,
const Function F,
const CallExpr Call 
)

Interpret a builtin function.

Definition at line 1103 of file InterpBuiltin.cpp.

◆ InterpretOffsetOf()

bool clang::interp::InterpretOffsetOf ( InterpState S,
CodePtr  OpPC,
const OffsetOfExpr E,
llvm::ArrayRef< int64_t >  ArrayIndices,
int64_t &  Result 
)

Interpret an offsetof operation.

Definition at line 1440 of file InterpBuiltin.cpp.

◆ Inv()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Inv ( InterpState S,
CodePtr  OpPC 
)

Definition at line 474 of file Interp.h.

◆ Invalid()

bool clang::interp::Invalid ( InterpState S,
CodePtr  OpPC 
)
inline

Just emit a diagnostic.

The expression that caused emission of this op is not valid in a constant context.

Definition at line 2334 of file Interp.h.

◆ InvalidCast()

bool clang::interp::InvalidCast ( InterpState S,
CodePtr  OpPC,
CastKind  Kind 
)
inline

Same here, but only for casts.

Definition at line 2345 of file Interp.h.

◆ InvalidDeclRef()

bool clang::interp::InvalidDeclRef ( InterpState S,
CodePtr  OpPC,
const DeclRefExpr DR 
)
inline

Definition at line 2355 of file Interp.h.

◆ isIntegralType()

constexpr bool clang::interp::isIntegralType ( PrimType  T)
constexpr

◆ isPtrType()

constexpr bool clang::interp::isPtrType ( PrimType  T)
inlineconstexpr

◆ LE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LE ( InterpState S,
CodePtr  OpPC 
)

◆ Load()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Load ( InterpState S,
CodePtr  OpPC 
)

◆ LoadPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LoadPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1407 of file Interp.h.

◆ LT()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LT ( InterpState S,
CodePtr  OpPC 
)

◆ Memcpy()

bool clang::interp::Memcpy ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 1525 of file Interp.h.

◆ Mul()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Mul ( InterpState S,
CodePtr  OpPC 
)

◆ Mulf()

bool clang::interp::Mulf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 356 of file Interp.h.

◆ NarrowPtr()

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

Definition at line 2013 of file Interp.h.

◆ NE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::NE ( InterpState S,
CodePtr  OpPC 
)

◆ Neg()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Neg ( InterpState S,
CodePtr  OpPC 
)

Definition at line 490 of file Interp.h.

Referenced by clang::threadSafety::SExprBuilder::translateAttrExpr().

◆ noopPointer()

static bool clang::interp::noopPointer ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Just takes the first Argument to the call and puts it on the stack.

Definition at line 651 of file InterpBuiltin.cpp.

◆ NoRet()

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

Definition at line 2003 of file Interp.h.

◆ Null()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Null ( InterpState S,
CodePtr  OpPC,
const Descriptor Desc 
)
inline

Definition at line 1893 of file Interp.h.

◆ OffsetHelper()

template<class T , ArithOp Op>
bool clang::interp::OffsetHelper ( InterpState S,
CodePtr  OpPC,
const T Offset,
const Pointer Ptr 
)

Definition at line 1540 of file Interp.h.

◆ OffsetOf()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::OffsetOf ( InterpState S,
CodePtr  OpPC,
const OffsetOfExpr E 
)
inline

Definition at line 2374 of file Interp.h.

◆ operator<<() [1/7]

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

Definition at line 156 of file Boolean.h.

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

◆ operator<<() [2/7]

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

Definition at line 665 of file Pointer.h.

References P.

◆ operator<<() [3/7]

llvm::raw_ostream & clang::interp::operator<< ( llvm::raw_ostream &  OS,
Floating  F 
)

Definition at line 14 of file Floating.cpp.

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

◆ operator<<() [4/7]

llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
FunctionPointer  FP 
)
inline

Definition at line 86 of file FunctionPointer.h.

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

◆ operator<<() [5/7]

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

Definition at line 299 of file Integral.h.

References OS, and clang::interp::Integral< Bits, Signed >::print().

◆ operator<<() [6/7]

template<bool Signed>
llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
IntegralAP< Signed >  I 
)
inline

Definition at line 314 of file IntegralAP.h.

References clang::interp::IntegralAP< Signed >::print().

◆ operator<<() [7/7]

llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
interp::CastKind  CK 
)
inline

Definition at line 57 of file PrimType.h.

References Atomic, and Reinterpret.

◆ peekToAPSInt()

static APSInt clang::interp::peekToAPSInt ( InterpStack Stk,
PrimType  T,
size_t  Offset = 0 
)
static

Peek an integer value from the stack into an APSInt.

Definition at line 62 of file InterpBuiltin.cpp.

References align(), INT_TYPE_SWITCH, Offset, clang::interp::InterpStack::peek(), primSize(), and clang::T.

◆ Pop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Pop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 930 of file Interp.h.

◆ popArg()

static void clang::interp::popArg ( InterpState S,
const Expr Arg 
)
static

Definition at line 192 of file Interp.cpp.

◆ primSize()

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

◆ pushInteger() [1/2]

static void clang::interp::pushInteger ( InterpState S,
const APSInt Val,
QualType  QT 
)
static

Pushes Val on the stack as the type given by QT.

Definition at line 73 of file InterpBuiltin.cpp.

◆ pushInteger() [2/2]

template<typename T >
static void clang::interp::pushInteger ( InterpState S,
T  Val,
QualType  QT 
)
static

Definition at line 90 of file InterpBuiltin.cpp.

◆ ReadArg()

template<typename T >
T clang::interp::ReadArg ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2416 of file Interp.h.

◆ ReadArg< Floating >()

template<>
Floating clang::interp::ReadArg< Floating > ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2425 of file Interp.h.

◆ ReadArg< IntegralAP< false > >()

template<>
IntegralAP<false> clang::interp::ReadArg< IntegralAP< false > > ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2425 of file Interp.h.

◆ ReadArg< IntegralAP< true > >()

template<>
IntegralAP<true> clang::interp::ReadArg< IntegralAP< true > > ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2425 of file Interp.h.

◆ Rem()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Rem ( InterpState S,
CodePtr  OpPC 
)

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS % RHS' on the stack (the remainder of dividing LHS by RHS).

Definition at line 420 of file Interp.h.

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

◆ Ret()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Ret ( InterpState S,
CodePtr PC,
APValue Result 
)

Definition at line 218 of file Interp.h.

Referenced by adjustColumnPos(), clang::SarifDocumentWriter::appendResult(), clang::WrapperFrontendAction::BeginSourceFileAction(), collectStrongDependencies(), collectWeakDependencies(), createCopyAssignmentDefinitionData(), createCopyConstructorDefinitionData(), createDefaultConstructorDefinitionData(), createDestructorDefinitionData(), createLocation(), createMoveAssignmentDefinitionData(), createMoveConstructorDefinitionData(), clang::SarifDocumentWriter::createRule(), determineEndOffset(), didPreviousFreeFail(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), clang::CodeGen::CodeGenFunction::EmitScalarCompoundAssignWithComplex(), clang::Sema::ExtractUnqualifiedFunctionType(), fileNameToURI(), clang::CodeGen::CodeGenFunction::FormSVEBuiltinResult(), llvm::IDFCalculatorDetail::ChildrenGetterTy< clang::CFGBlock, IsPostDom >::get(), clang::getAllPossibleAMDGPUTargetIDFeatures(), clang::getAllPossibleTargetIDFeatures(), clang::AnalyzerOptions::getCheckerBooleanOption(), clang::AnalyzerOptions::getCheckerIntegerOption(), clang::ento::BugType::getCheckerName(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::tooling::IncludeCategoryManager::getIncludePriority(), clang::cross_tu::CrossTranslationUnitContext::getLookupName(), clang::interp::Record::getName(), clang::BitsUnpacker::getNextBits(), getOutermostFuncOrBlockContext(), clang::ento::RetainSummary::getRetEffect(), clang::driver::ToolChain::getRuntimePath(), clang::tooling::IncludeCategoryManager::getSortIncludePriority(), HandleConstructorCall(), HandleDestructionImpl(), HandleFunctionCall(), clang::ento::RetainSummary::isNoop(), IsSYCLDeviceLibObj(), clang::LocalDeclID::operator++(), clang::ento::RetainSummary::operator==(), clang::TargetInfo::parseTargetAttr(), clang::targets::AArch64TargetInfo::parseTargetAttr(), clang::targets::RISCVTargetInfo::parseTargetAttr(), clang::ento::RetainSummary::Profile(), clang::ASTReader::ReadBitVector(), clang::TreeTransform< Derived >::RebuildExprRequirement(), clang::ento::RetainSummary::setRetEffect(), and clang::consumed::ConsumedStmtVisitor::VisitReturnStmt().

◆ retPrimValue()

static bool clang::interp::retPrimValue ( InterpState S,
CodePtr  OpPC,
APValue Result,
std::optional< PrimType > &  T 
)
static

Definition at line 106 of file InterpBuiltin.cpp.

◆ ReturnValue()

template<typename T >
bool clang::interp::ReturnValue ( const T V,
APValue R 
)

Convert a value to an APValue.

Definition at line 43 of file Interp.h.

References V.

Referenced by clang::CoroutineBodyStmt::getReturnValueInit().

◆ RetVoid()

bool clang::interp::RetVoid ( InterpState S,
CodePtr PC,
APValue Result 
)
inline

Definition at line 252 of file Interp.h.

◆ RVOPtr()

bool clang::interp::RVOPtr ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 1926 of file Interp.h.

◆ SetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 999 of file Interp.h.

◆ SetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1085 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 
)

1) Pops the value from the stack.

2) Writes the value to the local variable with the given offset.

Definition at line 962 of file Interp.h.

◆ SetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetParam ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 977 of file Interp.h.

◆ SetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 1045 of file Interp.h.

◆ SetThreeWayComparisonField()

bool clang::interp::SetThreeWayComparisonField ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
const APSInt IntValue 
)

Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type.

Definition at line 1514 of file InterpBuiltin.cpp.

◆ Shl()

template<PrimType NameL, PrimType NameR>
bool clang::interp::Shl ( InterpState S,
CodePtr  OpPC 
)
inline

◆ Shr()

template<PrimType NameL, PrimType NameR>
bool clang::interp::Shr ( InterpState S,
CodePtr  OpPC 
)
inline

◆ Store()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Store ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1418 of file Interp.h.

◆ StoreBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitField ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1442 of file Interp.h.

◆ StoreBitFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitFieldPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1457 of file Interp.h.

◆ StorePop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StorePop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1430 of file Interp.h.

◆ Sub()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Sub ( InterpState S,
CodePtr  OpPC 
)

Definition at line 331 of file Interp.h.

Referenced by EmitAtomicDecrementValue(), and EmitAtomicOp().

◆ Subf()

bool clang::interp::Subf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 338 of file Interp.h.

◆ SubOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SubOffset ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1627 of file Interp.h.

◆ SubPtr()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SubPtr ( InterpState S,
CodePtr  OpPC 
)
inline

1) Pops a Pointer from the stack.

2) Pops another Pointer from the stack. 3) Pushes the different of the indices of the two pointers on the stack.

Definition at line 1680 of file Interp.h.

◆ This()

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

Definition at line 1903 of file Interp.h.

Referenced by __clang_Interpreter_SetValueNoAlloc(), __clang_Interpreter_SetValueWithAlloc(), clang::CodeGen::CGCXXABI::adjustThisArgumentForVirtualFunctionCall(), clang::Sema::BuildCXXDefaultInitExpr(), clang::Sema::BuildCXXThisExpr(), clang::Sema::CheckDestructor(), checkDynamicType(), CheckLiteralType(), checkNonVirtualMemberCallThisPointer(), commonEmitCXXMemberOrOperatorCall(), ComputeDynamicType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoads(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateAtomic(), EvaluateInPlace(), EvaluateObjectArgument(), EvaluateRecord(), clang::CodeGen::CodeGenFunction::FieldConstructionScope::FieldConstructionScope(), findMetaClassAlloc(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::RetainSummary::getThisEffect(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), HandleConstructorCall(), HandleDestruction(), HandleDestructionImpl(), HandleFunctionCall(), HandleVirtualDispatch(), clang::Expr::isImplicitCXXThis(), clang::ento::RetainSummary::isNoop(), clang::ComparisonCategories::lookupInfo(), clang::Sema::MarkThisReferenced(), clang::OMPClauseWithPostUpdate::OMPClauseWithPostUpdate(), clang::OMPClauseWithPreInit::OMPClauseWithPreInit(), clang::ento::RetainSummary::operator==(), clang::ento::ExprEngine::processCallExit(), clang::ento::RetainSummary::Profile(), and clang::ento::RetainSummary::setThisEffect().

◆ VirtBaseHelper()

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

Definition at line 1360 of file Interp.h.

◆ Zero()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Zero ( InterpState S,
CodePtr  OpPC 
)

Definition at line 1877 of file Interp.h.

◆ ZeroIntAP()

static bool clang::interp::ZeroIntAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1882 of file Interp.h.

◆ ZeroIntAPS()

static bool clang::interp::ZeroIntAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1887 of file Interp.h.