|
clang 24.0.0git
|
Classes | |
| class | ArrayIndexScope |
| struct | BitcastBuffer |
| Track what bits have been initialized to known values and which ones have indeterminate value. More... | |
| struct | BitRange |
| A bit range. Both Start and End are inclusive. More... | |
| struct | Bits |
| A quantity in bits. More... | |
| class | Block |
| A memory block, either on the stack or in the heap. More... | |
| struct | BlockFlags |
| struct | BlockPointer |
| class | Boolean |
| Wrapper around boolean types. More... | |
| class | ByteCodeEmitter |
| An emitter which links the program to bytecode for later use. More... | |
| struct | Bytes |
| A quantity in bytes. More... | |
| class | Char |
| struct | CharRepr |
| struct | CharRepr< false > |
| struct | CharRepr< true > |
| class | CodePtr |
| Pointer into the code segment. More... | |
| class | Compiler |
| Compilation context for expressions. More... | |
| class | Context |
| Holds all information required to evaluate constexpr code in a module. More... | |
| class | DeadBlock |
| Descriptor for a dead block. More... | |
| struct | DeclOrExpr |
| class | DeclScope |
| Scope used to handle temporaries in toplevel variable declarations. More... | |
| struct | Descriptor |
| Describes a memory block created by an allocation site. More... | |
| class | DynamicAllocator |
| Manages dynamic memory allocations done during bytecode interpretation. More... | |
| class | EvalEmitter |
| An emitter which evaluates opcodes as they are emitted. More... | |
| class | EvalIDScope |
| struct | EvalSettings |
| class | EvaluationResult |
| Defines the result of an evaluation. More... | |
| class | FixedPoint |
| Wrapper around fixed point types. More... | |
| class | Floating |
| If a Floating is constructed from Memory, it DOES NOT OWN THAT MEMORY. More... | |
| class | Frame |
| Base class for stack frames, shared between VM and walker. More... | |
| class | FrameAllocator |
| Allocator for function frames. More... | |
| struct | FuncParam |
| class | Function |
| Bytecode function. More... | |
| struct | FunctionPointer |
| struct | GlobalInlineDescriptor |
| Descriptor used for global variables. More... | |
| struct | InitLink |
| class | InitLinkScope |
| struct | InitMap |
| Bitfield tracking the initialisation status of elements of primitive arrays. More... | |
| struct | InitMapPtr |
| A pointer-sized struct we use to allocate into data storage. More... | |
| class | InitStackScope |
| struct | InlineDescriptor |
| Inline descriptor embedded in structures and arrays. More... | |
| class | Integral |
| Wrapper around numeric types. More... | |
| class | IntegralAP |
| If an IntegralAP is constructed from Memory, it DOES NOT OWN THAT MEMORY. More... | |
| class | InterpFrame |
| Frame storing local variables. More... | |
| class | InterpStack |
| Stack frame storing temporaries and parameters. More... | |
| class | InterpState |
| Interpreter context. More... | |
| class | InterpStateCCOverride |
| struct | IntPointer |
| struct | LocalInlineDescriptor |
| class | LocalScope |
| Generic scope for local variables. More... | |
| class | LocOverrideScope |
| When generating code for e.g. More... | |
| class | LoopScope |
| Sets the context for break/continue statements. More... | |
| class | MemberPointer |
| struct | OpaquePointer |
| class | OptionScope |
| Scope used to handle initialization methods. More... | |
| class | OptPrimType |
| struct | ParamOffset |
| class | Pointer |
| A pointer to a memory block, live or dead. More... | |
| struct | PointerPathEntry |
| struct | PrimConv |
| Mapping from primitive types to their representation. More... | |
| struct | PrimConv< PT_Bool > |
| struct | PrimConv< PT_FixedPoint > |
| struct | PrimConv< PT_Float > |
| struct | PrimConv< PT_IntAP > |
| struct | PrimConv< PT_IntAPS > |
| struct | PrimConv< PT_MemberPtr > |
| struct | PrimConv< PT_Ptr > |
| struct | PrimConv< PT_Reflect > |
| struct | PrimConv< PT_Sint16 > |
| struct | PrimConv< PT_Sint32 > |
| struct | PrimConv< PT_Sint64 > |
| struct | PrimConv< PT_Sint8 > |
| struct | PrimConv< PT_Uint16 > |
| struct | PrimConv< PT_Uint32 > |
| struct | PrimConv< PT_Uint64 > |
| struct | PrimConv< PT_Uint8 > |
| class | Program |
| The program contains and links the bytecode for all functions. More... | |
| struct | PtrView |
| class | Record |
| Structure/Class descriptor. More... | |
| class | Reflect |
| struct | Repr |
| struct | Repr< 16, false > |
| struct | Repr< 16, true > |
| struct | Repr< 32, false > |
| struct | Repr< 32, true > |
| struct | Repr< 64, false > |
| struct | Repr< 64, true > |
| struct | Repr< 8, false > |
| struct | Repr< 8, true > |
| class | Scope |
| Describes a scope block. More... | |
| class | SourceInfo |
| Describes the statement/declaration an opcode was generated from. More... | |
| class | SourceLocScope |
| class | SourceMap |
| 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... | |
| struct | StdAllocatorCaller |
| struct | StringPointer |
| class | SwitchScope |
| struct | TypeidPointer |
| struct | VarCreationState |
| State encapsulating if a the variable creation has been successful, unsuccessful, or no variable has been created at all. More... | |
| class | VariableScope |
| Scope chain managing the variable lifetimes. More... | |
Typedefs | |
| using | BlockCtorFn |
| Invoked whenever a block is created. | |
| using | BlockDtorFn = void (*)(std::byte *FieldPtr, const Descriptor *FieldDesc) |
| Invoked when a block is destroyed. | |
| using | APInt = llvm::APInt |
| using | APSInt = llvm::APSInt |
| using | APFloat = llvm::APFloat |
| using | FunctionDeclTy |
| using | InterpFn = bool (*)(InterpState &) PRESERVE_NONE |
| using | FixedPointSemantics = llvm::FixedPointSemantics |
| using | CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)> |
Functions | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Boolean &B) |
| template<bool Signed> | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Char< Signed > I) |
| static std::optional< bool > | getBoolValue (const Expr *E) |
| static bool | isSideEffectFree (const Expr *E) |
Check if E has side-effects. | |
| static bool | exceedsArraySizeLimit (const LangOptions &LangOpts, uint64_t NumElems) |
Whether the CheckArraySize op rejects an array with NumElems elements. | |
| DeclOrExpr | getSwappedBytes (DeclOrExpr F) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, DeclOrExpr D) |
| static void | DiagnoseUninitializedSubobject (InterpState &S, SourceLocation Loc, const FieldDecl *SubObjDecl) |
| static bool | CheckFieldsInitialized (InterpState &S, SourceLocation Loc, PtrView BasePtr, const Record *R, bool IsCompleteClass=true) |
| static bool | CheckArrayInitialized (InterpState &S, SourceLocation Loc, PtrView BasePtr) |
| static bool | isOrHasPtr (const Descriptor *D) |
| static void | collectBlocks (PtrView Ptr, llvm::SmallPtrSet< const Block *, 4 > &Blocks, bool IsCompleteClass=true) |
| static bool | isGlobalLValue (const Pointer &Ptr) |
| static bool | checkFunctionPtr (InterpState &S, const Pointer &Ptr, QualType PtrType, SourceInfo Info, ConstantExprKind ConstexprKind) |
| Check if the given function pointer can be returned from an evaluation. | |
| static bool | lvalFields (InterpState &S, const ASTContext &Ctx, PtrView Ptr, QualType PtrType, SourceInfo Info, ConstantExprKind ConstexprKind, llvm::SmallPtrSet< const Block *, 4 > &CheckedBlocks) |
| static bool | lval (InterpState &S, const ASTContext &Ctx, const Pointer &Ptr, QualType PtrType, SourceInfo Info, ConstantExprKind ConstexprKind, llvm::SmallPtrSet< const Block *, 4 > &CheckedBlocks) |
| FixedPoint | getSwappedBytes (FixedPoint F) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, FixedPoint F) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Floating F) |
| Floating | getSwappedBytes (Floating F) |
| 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 | noteValueLocation (InterpState &S, const Block *B) |
| void | noteValueLocation (InterpState &S, const Pointer &Ptr) |
| static bool | CheckTemporary (InterpState &S, CodePtr OpPC, const Block *B, AccessKinds AK) |
| static bool | CheckTemporary (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| static PRESERVE_NONE bool | BCP (InterpState &S, CodePtr OpPC, int32_t Offset, PrimType PT) |
| This is used to implement speculative execution via __builtin_constant_p when we generate bytecode. | |
| bool | diagnoseShiftFailure (InterpState &S, CodePtr OpPC, ShiftFailure Failure, const APSInt *Value, unsigned Bits) |
| bool | diagnoseArrayIndex (InterpState &S, CodePtr OpPC, const APSInt &Index, std::optional< uint64_t > NumElems, bool IsArray) |
| void | cleanupAfterFunctionCall (InterpState &S, const Function *Func) |
| bool | CheckBCPResult (InterpState &S, const Pointer &Ptr) |
| static bool | CheckActive (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK, bool WillActivate=false) |
| static bool | CheckActive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK, bool WillActivate=false) |
| static bool | CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| static bool | CheckExtern (InterpState &S, CodePtr OpPC, const Block *B) |
| bool | CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if the array is offsetable. | |
| bool | CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| Checks if a pointer is live and accessible. | |
| bool | CheckConstant (InterpState &S, CodePtr OpPC, const Descriptor *Desc, AccessKinds AK=AK_Read) |
| Checks if the Descriptor is of a constexpr or const global variable. | |
| static bool | CheckConstant (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Read) |
| static bool | CheckConstant (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK=AK_Read) |
| bool | CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
| Checks if a pointer is null. | |
| 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. | |
| bool | CheckSubobject (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
| Checks if Ptr is a one-past-the-end pointer. | |
| static bool | CheckConst (InterpState &S, CodePtr OpPC, PtrView Ptr) |
| bool | CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if a pointer points to const storage. | |
| bool | CheckMutable (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK=AK_Read) |
| Checks if a pointer points to a mutable field. | |
| static bool | CheckVolatile (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK) |
| bool | diagnoseUninitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| bool | diagnoseUninitialized (InterpState &S, CodePtr OpPC, bool Extern, const Block *B, Lifetime LT, AccessKinds AK) |
| static bool | diagnoseUninitialized (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK) |
| static bool | CheckLifetime (InterpState &S, CodePtr OpPC, Lifetime LT, const Block *B, AccessKinds AK) |
| static bool | CheckLifetime (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| static bool | CheckWeak (InterpState &S, CodePtr OpPC, const Block *B) |
| bool | CheckGlobalLoad (InterpState &S, CodePtr OpPC, const Block *B) |
| Checks a direct load of a primitive value from a global or local variable. | |
| bool | CheckLocalLoad (InterpState &S, CodePtr OpPC, const Block *B) |
| bool | CheckLoad (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK) |
| bool | CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Read) |
| Checks if a value can be loaded from a block. | |
| bool | CheckFinalLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| This is not used by any of the opcodes directly. | |
| bool | CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Assign, bool WillBeActivated=false) |
| Checks if a value can be stored in a block. | |
| static bool | CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr, bool IsCtor, bool IsDtor) |
| bool | CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if a value can be initialized. | |
| static bool | diagnoseCallableDecl (InterpState &S, CodePtr OpPC, const FunctionDecl *DiagDecl) |
| static bool | CheckCallable (InterpState &S, CodePtr OpPC, const Function *F) |
| static bool | CheckCallDepth (InterpState &S, CodePtr OpPC) |
| bool | CheckThis (InterpState &S, CodePtr OpPC) |
| Checks the 'this' pointer. | |
| bool | CheckFloatStatus (InterpState &S, CodePtr OpPC, APFloat::opStatus Status, FPOptions FPO) |
| Check if the given floating-point evaluation status is allowed for compile-time constant folding during translation (as opposed to mandatory constant expression evaluation). | |
| bool | CheckFloatResult (InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status, FPOptions FPO) |
| Checks if the result of a floating-point operation is valid in the current context. | |
| bool | CheckDynamicMemoryAllocation (InterpState &S, CodePtr OpPC) |
| Checks if dynamic memory allocation is available in the current language mode. | |
| bool | CheckNewDeleteForms (InterpState &S, CodePtr OpPC, DynamicAllocator::Form AllocForm, DynamicAllocator::Form DeleteForm, const Descriptor *D, const Expr *NewExpr) |
| Diagnose mismatched new[]/delete or new/delete[] pairs. | |
| bool | CheckDeleteSource (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us. | |
| 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. | |
| bool | InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR, bool InitializerFailed) |
| bool | diagnoseDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| bool | CheckDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| Checks if a pointer is a dummy pointer. | |
| static bool | CheckNonNullArgs (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize) |
| static bool | runRecordDestructor (InterpState &S, CodePtr OpPC, const Pointer &BasePtr, const Descriptor *Desc) |
| static bool | RunDestructors (InterpState &S, CodePtr OpPC, const Block *B) |
| static bool | hasVirtualDestructor (QualType T) |
| bool | Free (InterpState &S, CodePtr OpPC, bool DeleteIsArrayForm, bool IsGlobalDelete) |
| void | diagnoseEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED, const APSInt &Value) |
| bool | CheckLiteralType (InterpState &S, CodePtr OpPC, const Type *T) |
| static bool | diagnoseTypeIdField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, unsigned Offset) |
| static bool | allowNullSubObj (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| static bool | getField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Off) |
| bool | GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off) |
| 1) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack | |
| bool | GetPtrFieldPop (InterpState &S, CodePtr OpPC, uint32_t Off) |
| static bool | getBase (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Off, bool NullOK) |
| bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK) |
| bool | GetPtrDerivedPop (InterpState &S, CodePtr OpPC, bool NullOK, const Type *TargetType, const Type *FinalType) |
| static bool | checkConstructor (InterpState &S, CodePtr OpPC, const Function *Func, const Pointer &ThisPtr) |
| static bool | diagnoseOutOfLifetimeDestroy (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| bool | checkDestructor (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| bool | CheckFunctionDecl (InterpState &S, CodePtr OpPC, const FunctionDecl *FD) |
| Opcode. Check if the function decl can be called at compile time. | |
| bool | CheckBitCast (InterpState &S, CodePtr OpPC, const Type *TargetType, bool SrcIsVoidPtr) |
| bool | PtrPtrCast (InterpState &S, CodePtr OpPC, bool SrcIsVoidPtr, const Type *TargetType) |
| static void | compileFunction (InterpState &S, const Function *Func, CodePtr OpPC) |
| bool | CallVar (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
| bool | Call (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
| static bool | getDynamicDecl (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const CXXRecordDecl *&DynamicDecl) |
| static DynamicCastResult | findRecordBase (const ASTContext &Ctx, const Record *R, QualType Needle) |
| bool | DynamicCast (InterpState &S, CodePtr OpPC, const Type *DestTypePtr, bool IsReferenceCast) |
| bool | CallVirt (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
| bool | CallBI (InterpState &S, CodePtr OpPC, const CallExpr *CE, uint32_t BuiltinID) |
| bool | CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE) |
| static void | startLifetimeRecurse (PtrView Ptr) |
| bool | StartThisLifetime (InterpState &S) |
| bool | StartThisLifetime1 (InterpState &S) |
| static void | setLifeStateRecurse (PtrView Ptr, Lifetime L) |
| bool | EndLifetime (InterpState &S, CodePtr OpPC) |
| Ends the lifetime of the peek'd pointer. | |
| bool | PseudoDtor (InterpState &S, CodePtr OpPC) |
| Ends the lifetime of the pop'd pointer. | |
| bool | MarkDestroyed (InterpState &S, CodePtr OpPC) |
| static void | initBasesRecurse (PtrView Ptr) |
| bool | DefaultInit (InterpState &S, CodePtr OpPC, const CXXConstructorDecl *Ctor) |
| bool | CheckNewTypeMismatch (InterpState &S, CodePtr OpPC, const Expr *E, std::optional< uint64_t > ArraySize=std::nullopt) |
| Check if the initializer and storage types of a placement-new expression match. | |
| bool | InvalidNewDeleteExpr (InterpState &S, CodePtr OpPC, const Expr *E) |
| bool | CheckPlacementNew (InterpState &S, CodePtr OpPC, const Expr *E) |
| bool | handleFixedPointOverflow (InterpState &S, CodePtr OpPC, const FixedPoint &FP) |
| bool | InvalidShuffleVectorIndex (InterpState &S, CodePtr OpPC, uint32_t Index) |
| bool | CheckPointerToIntegralCast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, unsigned BitWidth) |
| bool | CheckIntegralAddressCast (InterpState &S, CodePtr OpPC, unsigned BitWidth) |
| bool | CastPointerIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| bool | CastPointerIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| bool | CheckBitCast (InterpState &S, CodePtr OpPC, bool HasIndeterminateBits, bool TargetIsUCharOrByte) |
| bool | handleReference (InterpState &S, CodePtr OpPC, Block *B) |
| bool | GetTypeid (InterpState &S, const Type *TypePtr, const Type *TypeInfoType) |
| Typeid support. | |
| bool | GetTypeidPtr (InterpState &S, CodePtr OpPC, const Type *TypeInfoType) |
| bool | DiagTypeid (InterpState &S, CodePtr OpPC) |
| bool | arePotentiallyOverlappingStringLiterals (const Pointer &LHS, const Pointer &RHS) |
| static void | copyPrimitiveMemory (InterpState &S, PtrView Ptr, PrimType T) |
| template<typename T> | |
| static void | copyPrimitiveMemory (InterpState &S, PtrView Ptr) |
| static void | finishGlobalRecurse (InterpState &S, PtrView Ptr) |
| bool | FinishInitGlobal (InterpState &S) |
| bool | InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind, bool Fatal) |
| bool | Destroy (InterpState &S, CodePtr OpPC, uint32_t I) |
| static bool | castBackMemberPointer (InterpState &S, const MemberPointer &MemberPtr, int32_t BaseOffset, const RecordDecl *BaseDecl) |
| static bool | appendToMemberPointer (InterpState &S, const MemberPointer &MemberPtr, int32_t BaseOffset, const RecordDecl *BaseDecl, bool IsDerivedMember) |
| bool | CastMemberPtrBasePop (InterpState &S, int32_t Off, const RecordDecl *BaseDecl) |
| DerivedToBaseMemberPointer. | |
| bool | CastMemberPtrDerivedPop (InterpState &S, int32_t Off, const RecordDecl *BaseDecl) |
| BaseToDerivedMemberPointer. | |
| bool | GetMemberPtr (InterpState &S, const ValueDecl *D) |
| bool | GetMemberPtrBase (InterpState &S) |
| bool | GetMemberPtrDecl (InterpState &S) |
| bool | CopyMemberPtrPath (InterpState &S, const RecordDecl *Entry, bool IsDerived) |
| Just append the given Entry to the MemberPointer's path. | |
| template<bool Signed> | |
| static bool | floatAPCast (InterpState &S, CodePtr OpPC, const Floating &F, uint32_t BitWidth, uint32_t FPOI) |
| bool | CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI) |
| bool | CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI) |
| bool | arrayElemPtrOpaque (InterpState &S, CodePtr OpPC, const Pointer &Ptr, APSInt &&Index, bool AllowReplace) |
| std::optional< Pointer > | addSubOffsetOpaque (InterpState &S, CodePtr OpPC, const Pointer &Ptr, APSInt &&Offset, ArithOp Op) |
| bool | virtBaseHelper (InterpState &S, const CXXRecordDecl *Decl, const Pointer &Ptr) |
| bool | Memcpy (InterpState &S, CodePtr OpPC) |
| bool | TrivialCopy (InterpState &S, CodePtr OpPC, bool Activate, const Function *Func) |
| static constexpr bool | OpReturns (Opcode Op) |
| bool | Interpret (InterpState &S) |
| Interpreter entry point. | |
| 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. | |
| template<ShiftDir Dir, 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. | |
| 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. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| PRESERVE_NONE bool | Ret (InterpState &S) |
| PRESERVE_NONE bool | RetVoid (InterpState &S) |
| 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<typename T, template< typename U > class Op> | |
| static bool | AddSubNonNumber (InterpState &S, CodePtr OpPC, T LHS, T RHS) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Add (InterpState &S, CodePtr OpPC) |
| bool | Addf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Sub (InterpState &S, CodePtr OpPC) |
| bool | Subf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Mul (InterpState &S, CodePtr OpPC) |
| bool | Mulf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Mulc (InterpState &S) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Divc (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitAnd (InterpState &S) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitOr (InterpState &S) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitXor (InterpState &S) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Rem (InterpState &S, CodePtr OpPC) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Div (InterpState &S, CodePtr OpPC) |
| 1) Pops the RHS from the stack. | |
| bool | Divf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| bool | Inv (InterpState &S) |
| 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, bool CanOverflow, UnsignedOrNone BitWidth=std::nullopt) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Inc (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| 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. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | IncBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, unsigned BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | IncPop (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| 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 | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | IncPopBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | PreInc (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | PreIncBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Dec (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| 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. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | DecBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | DecPop (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| 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 | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | DecPopBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | PreDec (InterpState &S, CodePtr OpPC, bool CanOverflow) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | PreDecBitfield (InterpState &S, CodePtr OpPC, bool CanOverflow, uint32_t BitWidth) |
| template<IncDecOp Op, PushVal DoPush> | |
| bool | IncDecFloatHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t FPOI) |
| bool | Incf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| bool | IncfPop (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| bool | Decf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| bool | DecfPop (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Comp (InterpState &S) |
| 1) Pops the value from the stack. | |
| template<typename T> | |
| bool | CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn) |
| template<typename T> | |
| bool | CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn) |
| template<> | |
| bool | CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
| template<> | |
| bool | CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
| template<> | |
| bool | CmpHelperEQ< MemberPointer > (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 | Dup (InterpState &S) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Pop (InterpState &S) |
| template<PrimType TopName, PrimType BottomName> | |
| bool | Flip (InterpState &S) |
| [Value1, Value2] -> [Value2, Value1] | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Const (InterpState &S, const T &Arg) |
| bool | ConstFloat (InterpState &S, const Floating &F) |
| 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, uint32_t I) |
| 1) Pops the value from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetParam (InterpState &S, uint32_t Index) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SetParam (InterpState &S, 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 | |
| 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 | |
| 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 | 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. | |
| 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, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitGlobalTemp (InterpState &S, 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 | |
| bool | InitGlobalTempComp (InterpState &S, 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 | |
| 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 | InitThisFieldActivate (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitThisBitField (InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitThisBitFieldActivate (InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) |
| 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 | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitFieldActivate (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitBitField (InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitBitFieldActivate (InterpState &S, CodePtr OpPC, uint32_t FieldOffset, uint32_t FieldBitWidth) |
| bool | GetPtrLocal (InterpState &S, uint32_t I) |
| bool | GetRefLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | GetRefGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | CheckRefInit (InterpState &S, CodePtr OpPC) |
| bool | GetPtrParam (InterpState &S, uint32_t Index) |
| bool | GetPtrGlobal (InterpState &S, uint32_t I) |
| bool | GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | FinishInitPop (InterpState &S) |
| bool | FinishInit (InterpState &S) |
| bool | FinishInitActivate (InterpState &S) |
| bool | FinishInitActivatePop (InterpState &S) |
| bool | Dump (InterpState &S) |
| bool | CheckNull (InterpState &S, CodePtr OpPC) |
| bool | GetPtrVirtBasePop (InterpState &S, CodePtr OpPC, const CXXRecordDecl *D) |
| bool | GetPtrVirtBase (InterpState &S, CodePtr OpPC, const CXXRecordDecl *D) |
| bool | GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const CXXRecordDecl *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) |
| bool | LoadPopL (InterpState &S, CodePtr OpPC) |
| Like LoadPop above, but if any of the checks fail, we turn the pointer into an opaque pointer of appropriate type. | |
| 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) |
| static bool | Activate (InterpState &S) |
| static bool | ActivateThisField (InterpState &S, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | StoreActivate (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | StoreActivatePop (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 | StoreBitFieldActivate (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | StoreBitFieldActivatePop (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. | |
| 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. | |
| bool | ToMemberPtr (InterpState &S) |
| bool | CastMemberPtrPtr (InterpState &S, CodePtr OpPC) |
| template<class T, ArithOp Op> | |
| std::optional< Pointer > | 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) |
| bool | GetOpaquePtr (InterpState &S, DeclOrExpr DOE, bool ConstexprUnknown) |
| 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, uint32_t ElemSize) |
| 1) Pops a Pointer from the stack. | |
| bool | EnableLocal (InterpState &S, uint32_t I) |
| bool | GetLocalEnabled (InterpState &S, uint32_t I) |
| template<PrimType TIn, PrimType TOut> | |
| bool | Cast (InterpState &S, CodePtr OpPC) |
| bool | CastFP (InterpState &S, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
| 1) Pops a Floating from the stack. | |
| bool | CastFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastAP (InterpState &S, uint32_t BitWidth) |
| Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastAPS (InterpState &S, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastAPToOffsetIndex (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastFloatingIntegral (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| bool | AddrOf (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastPointerIntegral (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| static bool | CastIntegralFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS) |
| static bool | CastFloatingFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS) |
| static bool | CastFixedPointFloating (InterpState &S, const llvm::fltSemantics *Sem) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| static bool | CastFixedPointIntegral (InterpState &S, CodePtr OpPC) |
| static bool | FnPtrCast (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Zero (InterpState &S) |
| static bool | ZeroIntAP (InterpState &S, uint32_t BitWidth) |
| static bool | ZeroIntAPS (InterpState &S, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Null (InterpState &S, uint64_t Value, const Type *Ty) |
| bool | CastAddressSpace (InterpState &S, CodePtr OpPC, uint64_t Value, const Type *Ty) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | IsNonNull (InterpState &S) |
| bool | This (InterpState &S, CodePtr OpPC) |
| bool | RVOPtr (InterpState &S) |
| template<class LT, class RT, ShiftDir Dir> | |
| bool | DoShift (InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS, LT *Result) |
| template<class LT, class RT, ShiftDir Dir> | |
| bool | DoShiftAP (InterpState &S, CodePtr OpPC, const APSInt &LHS, APSInt RHS, LT *Result) |
| A version of DoShift that works on IntegralAP. | |
| template<PrimType NameL, PrimType NameR> | |
| bool | Shr (InterpState &S, CodePtr OpPC) |
| template<PrimType NameL, PrimType NameR> | |
| bool | Shl (InterpState &S, CodePtr OpPC) |
| static bool | ShiftFixedPoint (InterpState &S, CodePtr OpPC, bool Left) |
| PRESERVE_NONE bool | NoRet (InterpState &S) |
| bool | NarrowPtr (InterpState &S) |
| bool | ExpandPtr (InterpState &S) |
| template<typename T> | |
| bool | arrayElemPtr (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const T &Offset) |
| 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. | |
| bool | GetFnPtr (InterpState &S, const Function *Func) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetIntPtr (InterpState &S, CodePtr OpPC, const Type *Ty) |
| bool | GetStringPtr (InterpState &S, const Expr *Base) |
| bool | Unsupported (InterpState &S, CodePtr OpPC) |
| Just emit a diagnostic. | |
| bool | InvalidTargetLabel (InterpState &S, CodePtr OpPC, bool IsContinue) |
| bool | PushIgnoreDiags (InterpState &S) |
| bool | PopIgnoreDiags (InterpState &S) |
| bool | StartSpeculation (InterpState &S) |
| bool | StartInit (InterpState &S) |
| bool | StartFieldInit (InterpState &S, uint32_t FieldOffset) |
| bool | EndInit (InterpState &S) |
| PRESERVE_NONE bool | EndSpeculation (InterpState &S) |
| bool | PushCC (InterpState &S, bool Value) |
| bool | PopCC (InterpState &S) |
| bool | PushMSVCCE (InterpState &S) |
| bool | PopMSVCCE (InterpState &S) |
| bool | Error (InterpState &S) |
| Do nothing and just abort execution. | |
| bool | SideEffect (InterpState &S) |
| bool | CtorCheck (InterpState &S) |
| Abort without a diagnostic if we're checking for a potential constant expression and this is not the bottom frame. | |
| bool | InvalidStore (InterpState &S, CodePtr OpPC, const Type *T) |
| bool | SizelessVectorElementSize (InterpState &S, CodePtr OpPC) |
| bool | CheckPseudoDtor (InterpState &S, CodePtr OpPC) |
| 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 Name, class T = typename PrimConv<Name>::T> | |
| bool | CheckEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED) |
| template<PrimType TIn, PrimType TOut> | |
| bool | DecayPtr (InterpState &S) |
| OldPtr -> Integer -> NewPtr. | |
| bool | CheckDecl (InterpState &S, const VarDecl *VD) |
| bool | CheckArrayDestSize (InterpState &S, CodePtr OpPC, size_t NumElems) |
Check if the destination array we're initializing can hold the NumElems elements. | |
| bool | Alloc (InterpState &S, CodePtr OpPC, const Descriptor *Desc) |
| template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
| bool | AllocN (InterpState &S, CodePtr OpPC, PrimType T, const Expr *Source, bool IsNoThrow) |
| template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
| bool | AllocCN (InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow) |
| static bool | IsConstantContext (InterpState &S) |
| static bool | CheckAllocations (InterpState &S) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CheckNewTypeMismatchArray (InterpState &S, CodePtr OpPC, const Expr *E) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitCastPrim (InterpState &S, CodePtr OpPC, bool TargetIsUCharOrByte, uint32_t ResultBitWidth, const llvm::fltSemantics *Sem, const Type *TargetType) |
| bool | BitCast (InterpState &S, CodePtr OpPC) |
| bool | CheckDestruction (InterpState &S, CodePtr OpPC) |
| bool | ReflectValue (InterpState &S, CodePtr OpPC, ReflectionKind Kind, const void *Operand) |
| bool | IsBaseClass (InterpState &S) |
| template<typename T> | |
| T | ReadArg (InterpState &S, CodePtr &OpPC) |
| template<> | |
| Floating | ReadArg< Floating > (InterpState &S, CodePtr &OpPC) |
| template<> | |
| IntegralAP< false > | ReadArg< IntegralAP< false > > (InterpState &S, CodePtr &OpPC) |
| template<> | |
| IntegralAP< true > | ReadArg< IntegralAP< true > > (InterpState &S, CodePtr &OpPC) |
| template<> | |
| FixedPoint | ReadArg< FixedPoint > (InterpState &S, CodePtr &OpPC) |
| static bool | isNoopBuiltin (unsigned ID) |
| static bool | isFixedSizeIntegralType (PrimType T) |
| static void | discard (InterpStack &Stk, PrimType T) |
| static bool | popToUInt64 (const InterpState &S, const Expr *E, uint64_t &Out) |
| static bool | popToAPSInt (InterpStack &Stk, PrimType T, APSInt &Out) |
| static bool | popToAPSInt (InterpState &S, const Expr *E, APSInt &Out) |
| static bool | popToAPSInt (InterpState &S, QualType T, APSInt &Out) |
| static bool | isReadable (const Pointer &P) |
| Check for common reasons a pointer can't be read from, which are usually not diagnosed in a builtin function. | |
| static void | pushInteger (InterpState &S, const APSInt &Val, QualType QT) |
Pushes Val on the stack as the type given by QT. | |
| template<typename T> | |
| static void | pushInteger (InterpState &S, T Val, QualType QT) |
| static void | assignIntegral (InterpState &S, const Pointer &Dest, PrimType ValueT, const APSInt &Value) |
| static QualType | getElemType (const Pointer &P) |
| static void | diagnoseNonConstexprBuiltin (InterpState &S, CodePtr OpPC, unsigned ID) |
| static bool | diagnoseUnreadableObject (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| static llvm::APSInt | convertBoolVectorToInt (const Pointer &Val) |
| static bool | convertDoubleToFloatStrict (const APFloat &Src, Floating &Dst, InterpState &S, const Expr *DiagExpr) |
| static bool | interp__builtin_is_constant_evaluated (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_assume (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, unsigned ID) |
| static bool | interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool Signaling) |
| static bool | interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame) |
| static bool | interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool IsNumBuiltin) |
| static bool | interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool IsNumBuiltin) |
| static bool | interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc. | |
| static bool | interp__builtin_issignaling (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool CheckSign, const CallExpr *Call) |
| static bool | interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_signbit (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp_floating_comparison (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| First parameter to __builtin_isfpclass is the floating value, the second one is an integral value. | |
| static bool | interp__builtin_fpclassify (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| Five int values followed by one floating value. | |
| static Floating | abs (InterpState &S, const Floating &In) |
| static bool | interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame) |
| static bool | interp__builtin_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_ia32_crc32 (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned DataBytes) |
| static bool | interp__builtin_classify_type (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_expect (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_addressof (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_move (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_eh_return_data_regno (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_overflowop (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinOp) |
| static bool | interp__builtin_carryop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp) |
| Three integral values followed by a pointer (lhs, rhs, carry, carryOut). | |
| static bool | interp__builtin_clz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp) |
| static bool | interp__builtin_ctz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID) |
| static bool | interp__builtin_bswap (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_atomic_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp) |
| bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) | |
| static bool | interp__builtin_c11_atomic_is_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| bool __c11_atomic_is_lock_free(size_t) | |
| static bool | interp__builtin_complex (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| __builtin_complex(Float A, float B); | |
| static bool | interp__builtin_is_aligned_up_down (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp) |
| __builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer. | |
| static CharUnits | getBaseAlignment (const ASTContext &ASTCtx, const Pointer &Ptr) |
| Returns the alignment of the object Ptr points into. | |
| static bool | interp__builtin_assume_aligned (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| __builtin_assume_aligned(Ptr, Alignment[, ExtraOffset]) | |
| static bool | interp__builtin_ia32_addcarry_subborrow (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool IsAdd) |
| (CarryIn, LHS, RHS, Result) | |
| static bool | interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_ptrauth_string_discriminator (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_infer_alloc_token (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_operator_new (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_operator_delete (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_arithmetic_fence (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_vector_reduce (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_elementwise_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID) |
| static bool | interp__builtin_elementwise_countzeroes (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID) |
| Can be called with an integer or vector as the first and only parameter. | |
| static bool | interp__builtin_memcpy (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) |
| static bool | isOneByteCharacterType (QualType T) |
| Determine if T is a character type for which we guarantee that sizeof(T) == 1. | |
| static bool | interp__builtin_stdc_memreverse8 (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_load8 (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool IsBigEndian, bool IsAligned) |
| static bool | interp__builtin_memcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_memchr (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_object_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool IsDynamic) |
| static bool | interp__builtin_is_within_lifetime (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_elementwise_int_unaryop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &)> Fn) |
| static bool | interp__builtin_elementwise_fp_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::optional< APFloat >(const APFloat &, const APFloat &, std::optional< APSInt > RoundingMode)> Fn, bool IsScalar=false) |
| static bool | interp__builtin_scalar_fp_round_mask_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::optional< APFloat >(const APFloat &, const APFloat &, std::optional< APSInt >)> Fn) |
| static bool | interp__builtin_elementwise_int_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &)> Fn) |
| static bool | interp__builtin_ia32_pack (InterpState &S, CodePtr, const CallExpr *E, llvm::function_ref< APInt(const APSInt &)> PackFn) |
| static bool | interp__builtin_elementwise_maxmin (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinID) |
| static bool | interp__builtin_ia32_pmul (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &, const APSInt &, const APSInt &)> Fn) |
| static bool | interp__builtin_ia32_psadbw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_dbpsadbw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_mpsadbw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp_builtin_horizontal_int_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &)> Fn) |
| static bool | interp_builtin_horizontal_fp_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APFloat(const APFloat &, const APFloat &, llvm::RoundingMode)> Fn) |
| static bool | interp__builtin_ia32_addsub (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_pclmulqdq (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_elementwise_triop_fp (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APFloat(const APFloat &, const APFloat &, const APFloat &, llvm::RoundingMode)> Fn) |
| static bool | interp__builtin_ia32_select (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]". | |
| static bool | interp__builtin_ia32_select_scalar (InterpState &S, const CallExpr *Call) |
| Scalar variant of AVX512 predicated select: Result[i] = (Mask bit 0) ? | |
| static bool | interp__builtin_ia32_test_op (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< bool(const APInt &A, const APInt &B)> Fn) |
| static bool | interp__builtin_ia32_movmsk_op (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_elementwise_triop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &, const APSInt &)> Fn) |
| static bool | interp__builtin_ia32_extract_vector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_extract_vector_masked (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_insert_subvector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_phminposuw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_pternlog (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool MaskZ) |
| static bool | interp__builtin_ia32_vec_ext (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_vec_set (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | evalICmpImm (uint8_t Imm, const APSInt &A, const APSInt &B, bool IsUnsigned) |
| static bool | interp__builtin_ia32_cmp_mask (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID, bool IsUnsigned) |
| static bool | interp__builtin_ia32_vpconflict (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_cvt_vec2mask (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_cvt_mask2vec (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_cvtsd2ss (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool HasRoundingMask) |
| static bool | interp__builtin_ia32_cvtpd2ps (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool IsMasked, bool HasRounding) |
| static bool | interp__builtin_ia32_shuffle_generic (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::pair< unsigned, int >(unsigned, const APInt &)> GetSourceIndex) |
| static bool | interp__builtin_ia32_shuffle_generic (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::pair< unsigned, int >(unsigned, unsigned)> GetSourceIndex) |
| static bool | interp__builtin_ia32_shift_with_count (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APInt &, uint64_t)> ShiftOp, llvm::function_ref< APInt(const APInt &, unsigned)> OverflowOp) |
| static bool | interp__builtin_ia32_shufbitqmb_mask (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_vcvtps2ph (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_multishiftqb (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_gfni_affine (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool Inverse) |
| static bool | interp__builtin_ia32_gfni_mul (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_vpdp (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool IsSaturating) |
| static bool | interp__builtin_ia32_bmac (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool IsXor) |
| static bool | interp_builtin_ia32_cvt_scalar_to_int (InterpState &S, CodePtr OpPC, const CallExpr *E) |
| static bool | interp_builtin_ia32_cvt_vector_to_int (InterpState &S, CodePtr OpPC, const CallExpr *E) |
| static bool | interp__builtin_meta_is_type (InterpState &S, CodePtr OpPC, const CallExpr *) |
| bool | InterpretBuiltin (InterpState &S, CodePtr OpPC, const CallExpr *Call, uint32_t BuiltinID) |
| Interpret a builtin function. | |
| bool | InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, ArrayRef< int64_t > ArrayIndices, int64_t &Result) |
| Interpret an offsetof operation. | |
| static void | zeroAll (PtrView Dest) |
| static bool | copyComposite (InterpState &S, CodePtr OpPC, PtrView Src, PtrView Dest, bool Activate, bool Diagnose) |
| static bool | copyRecord (InterpState &S, CodePtr OpPC, PtrView Src, PtrView Dest, bool Activate=false, bool Diagnose=true) |
| bool | DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest, bool Activate=true, bool Diagnose=false) |
| Copy the contents of Src into Dest. | |
| static void | swapBytes (std::byte *M, size_t N) |
| bool | DoBitCast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, std::byte *Buff, Bits BitWidth, Bits FullBitWidth, bool &HasIndeterminateBits) |
| bool | DoBitCastPtr (InterpState &S, CodePtr OpPC, const Pointer &FromPtr, Pointer &ToPtr) |
| bool | DoBitCastPtr (InterpState &S, CodePtr OpPC, const Pointer &FromPtr, Pointer &ToPtr, size_t Size) |
| bool | readPointerToBuffer (const Context &Ctx, const Pointer &FromPtr, BitcastBuffer &Buffer, bool ReturnOnUninit) |
| bool | DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &SrcPtr, const Pointer &DestPtr, Bits Size) |
| UnsignedOrNone | evaluateBuiltinObjectSize (const ASTContext &ASTCtx, unsigned Kind, Pointer &Ptr, const Expr *E, bool IsDynamic) |
| Evaluate __builtin_object_size or __builtin_dynamic_object_size for the given pointer and Kind. | |
| bool | CheckRange (InterpState &S, CodePtr OpPC, PtrView Ptr, AccessKinds AK) |
| Checks if a pointer is in range. | |
| bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| bool | CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Read) |
| template<typename T> | |
| bool | handleOverflow (InterpState &S, CodePtr OpPC, const T &SrcValue) |
| bool | CheckArraySize (InterpState &S, CodePtr OpPC, uint64_t NumElems) |
| static llvm::RoundingMode | getRoundingMode (FPOptions FPO) |
| bool | Invalid (InterpState &S, CodePtr OpPC) |
| template<typename SizeT> | |
| bool | CheckArraySize (InterpState &S, CodePtr OpPC, SizeT NumElements, unsigned ElemSize, bool IsNoThrow) |
| llvm::BitVector | collectNonNullArgs (const FunctionDecl *F, ArrayRef< const Expr * > Args) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const MemberPointer &FP) |
| 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. | |
| template<typename T> | |
| bool | CheckAddUB (T A, T B, T &R) |
| template<typename T> | |
| bool | CheckSubUB (T A, T B, T &R) |
| template<typename T> | |
| bool | CheckMulUB (T A, T B, T &R) |
| size_t | primSize (PrimType Type) |
| Returns the size of a primitive type in bytes. | |
| constexpr bool | isIntegerOrBoolType (PrimType T) |
| constexpr bool | isIntegerType (PrimType T) |
| constexpr bool | isPtrType (PrimType T) |
| constexpr bool | isSignedType (PrimType T) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, interp::CastKind CK) |
| template<typename T> | |
| constexpr bool | needsAlloc () |
| constexpr bool | needsAlloc (PrimType T) |
| template<typename T> | |
| constexpr bool | isIntegralOrPointer () |
| template<typename T> | |
| constexpr bool | isFixedSizeIntegralType () |
| constexpr size_t | align (size_t Size) |
| Aligns a size to the pointer alignment. | |
| constexpr bool | aligned (uintptr_t Value) |
| static bool | aligned (const void *P) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Reflect &R) |
Variables | |
| const InterpFn | InterpFunctions [] |
| using clang::interp::APFloat = llvm::APFloat |
Definition at line 27 of file Floating.h.
| using clang::interp::APInt = llvm::APInt |
Definition at line 19 of file FixedPoint.h.
| using clang::interp::APSInt = llvm::APSInt |
Definition at line 20 of file FixedPoint.h.
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.
| using clang::interp::BlockDtorFn = void (*)(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.
| using clang::interp::CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)> |
| using clang::interp::FixedPointSemantics = llvm::FixedPointSemantics |
Definition at line 65 of file Function.h.
| using clang::interp::InterpFn = bool (*)(InterpState &) PRESERVE_NONE |
Definition at line 3801 of file Interp.cpp.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Reinterpret | |
| ReinterpretLike | |
| ReinterpretPtrToInt | |
| Volatile | |
| Dynamic | |
Definition at line 107 of file PrimType.h.
|
strong |
| Enumerator | |
|---|---|
| Little | |
| Big | |
Definition at line 19 of file BitcastBuffer.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Dtor | |
Definition at line 41 of file InterpState.h.
|
strong |
| Enumerator | |
|---|---|
| Initialized | |
| NoInitializer | |
| InitializerFailed | |
Definition at line 41 of file Descriptor.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Number | Just a number, nothing else. |
| Address | A pointer to a ValueDecl. |
| ExprAddress | A pointer to an Expr. |
| BlockAddress | A pointer to an interp::Block. |
| LabelAddress | A pointer to a AddrLabelExpr. |
| FunctionAddress | A pointer to a FunctionDecl. |
| AddrLabelDiff | Difference between two AddrLabelExpr. |
Definition at line 24 of file Primitives.h.
|
strong |
| Enumerator | |
|---|---|
| Started | |
| NotStarted | |
| Destroyed | |
| Ended | |
Definition at line 53 of file Descriptor.h.
| enum clang::interp::Opcode : uint32_t |
| enum clang::interp::PrimType : uint8_t |
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_FixedPoint | |
| PT_Float | |
| PT_Ptr | |
| PT_MemberPtr | |
| PT_Reflect | |
Definition at line 35 of file PrimType.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Block | |
| FullExpression | |
| Call | |
Definition at line 111 of file Compiler.h.
|
strong |
|
strong |
|
strong |
|
inlinestatic |
Definition at line 790 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), clang::interp::Floating::copy(), and clang::New.
Referenced by interp__builtin_elementwise_abs(), and interp__builtin_fabs().
|
inlinestatic |
Definition at line 2276 of file Interp.h.
References clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
Referenced by copyComposite(), copyRecord(), DoMemcpy(), TrivialCopy(), clang::interp::Compiler< Emitter >::visitCallArgs(), and clang::interp::Compiler< Emitter >::visitInitList().
|
inlinestatic |
Definition at line 2282 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), and clang::interp::InterpFrame::hasThisPointer().
| bool clang::interp::Add | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 397 of file Interp.h.
References AddSubMulHelper(), AddSubNonNumber(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::OpaquePointer::computeLayoutOffset(), computeOpaquePtrOffset(), and clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 414 of file Interp.h.
References clang::interp::Floating::add(), clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::AddOffset | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2625 of file Interp.h.
References Add, addSubOffsetOpaque(), CheckNull(), clang::CSK_ArrayIndex, clang::interp::State::getLangOpts(), OffsetHelper(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 2997 of file Interp.h.
References clang::interp::OpaquePointer::FieldType, clang::interp::State::getASTContext(), clang::ASTContext::getPointerType(), clang::interp::OpaquePointer::isOnePastEnd(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and clang::interp::OpaquePointer::withFieldType().
| bool clang::interp::AddSubMulHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| unsigned | Bits, | ||
| const T & | LHS, | ||
| const T & | RHS ) |
Definition at line 315 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), handleFixedPointOverflow(), handleOverflow(), isIntegralOrPointer(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 366 of file Interp.h.
References AddrLabelDiff, clang::Invalid, Number, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| std::optional< Pointer > clang::interp::addSubOffsetOpaque | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| APSInt && | Offset, | ||
| ArithOp | Op ) |
Definition at line 3625 of file Interp.cpp.
References Add, clang::interp::InterpState::allocPointerPath(), clang::interp::InterpState::Current, diagnoseArrayIndex(), clang::interp::State::FFDiag(), clang::interp::OpaquePointer::FieldType, clang::ASTContext::getAsConstantArrayType(), clang::interp::State::getASTContext(), clang::QualType::getCanonicalType(), clang::interp::OpaquePointer::getFieldType(), clang::interp::InterpFrame::getSource(), clang::interp::OpaquePointer::getSurroundingArray(), clang::interp::PointerPathEntry::Index, clang::Invalid, clang::isa(), clang::interp::OpaquePointer::isArrayElement(), clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, Pointer, validType(), clang::interp::OpaquePointer::withPastEnd(), and clang::interp::OpaquePointer::withPath().
Referenced by AddOffset(), IncDecPtrHelper(), and SubOffset().
Aligns a size to the pointer alignment.
Definition at line 218 of file PrimType.h.
Referenced by aligned(), BCP(), Call(), CallPtr(), CheckNonNullArgs(), clang::interp::InterpFrame::describe(), clang::interp::Descriptor::Descriptor(), clang::interp::Descriptor::Descriptor(), clang::interp::InterpStack::dump(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), emitSerialized(), clang::interp::Context::getOrCreateFunction(), clang::interp::Context::getOrCreateObjCBlock(), clang::interp::Program::getOrCreateRecord(), clang::interp::InterpFrame::getRetOpPC(), clang::interp::Function::getWrittenArgSize(), printArg< FixedPoint >(), printArg< Floating >(), printArg< IntegralAP< false > >(), printArg< IntegralAP< true > >(), clang::interp::CodePtr::read(), ReadArg< FixedPoint >(), ReadArg< Floating >(), clang::interp::Compiler< Emitter >::VisitCallExpr(), and clang::interp::Compiler< Emitter >::VisitCXXConstructExpr().
|
inlinestatic |
Definition at line 225 of file PrimType.h.
References aligned().
Definition at line 222 of file PrimType.h.
References align().
Referenced by aligned(), clang::interp::ByteCodeEmitter::createLocal(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), emitSerialized(), clang::interp::InterpStack::peek(), and clang::interp::CodePtr::read().
|
inline |
Definition at line 3925 of file Interp.h.
References clang::interp::DynamicAllocator::allocate(), CheckDynamicMemoryAllocation(), clang::interp::InterpState::EvalID, clang::interp::InterpState::getAllocator(), clang::interp::DynamicAllocator::NonArray, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::DynamicAllocator::allocate(), and clang::interp::DynamicAllocator::cleanup().
|
inline |
Definition at line 3979 of file Interp.h.
References clang::interp::DynamicAllocator::allocate(), clang::interp::DynamicAllocator::Array, CheckArraySize(), CheckDynamicMemoryAllocation(), clang::interp::InterpState::Current, clang::interp::InterpState::EvalID, clang::interp::State::FFDiag(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::Descriptor::getSize(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::getType(), Pointer, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), SizeT, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3940 of file Interp.h.
References clang::interp::DynamicAllocator::allocate(), clang::interp::DynamicAllocator::Array, CheckArraySize(), CheckDynamicMemoryAllocation(), clang::interp::InterpState::Current, clang::interp::InterpState::EvalID, clang::interp::State::FFDiag(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getSource(), Pointer, clang::interp::InterpStack::pop(), primSize(), clang::interp::InterpStack::push(), SizeT, clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 1690 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::emitRelaxedDiag(), clang::interp::SourceInfo::getLoc(), and clang::interp::InterpFrame::getSource().
Referenced by getField().
|
static |
Definition at line 3422 of file Interp.cpp.
References clang::interp::InterpState::allocMemberPointerPath(), clang::cast(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by CastMemberPtrBasePop(), and CastMemberPtrDerivedPop().
| bool clang::interp::arePotentiallyOverlappingStringLiterals | ( | const Pointer & | LHS, |
| const Pointer & | RHS ) |
Definition at line 3143 of file Interp.cpp.
References clang::cast(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::getRootExpr(), clang::interp::Pointer::isOnePastEnd(), and clang::interp::Pointer::isStringPointer().
Referenced by CmpHelperEQ< Pointer >().
|
inline |
Just takes a pointer and checks if it's an incomplete array type.
Definition at line 3562 of file Interp.h.
References arrayElemPtrOpaque(), CheckRange(), clang::CSK_ArrayToPointer, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::OpaquePointer::getFieldType(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::inConstantContext(), clang::Type::isArrayType(), clang::interp::OpaquePointer::isUnknownSizeArray(), clang::interp::OpaquePointer::PathLength, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3507 of file Interp.h.
References CheckLoad(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3519 of file Interp.h.
References CheckLoad(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3491 of file Interp.h.
References arrayElemPtr(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3452 of file Interp.h.
References arrayElemPtrOpaque(), CheckArray(), clang::interp::InterpState::inConstantContext(), OffsetHelper(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by ArrayElemPtr(), and ArrayElemPtrPop().
| bool clang::interp::arrayElemPtrOpaque | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| APSInt && | Index, | ||
| bool | AllowReplace ) |
Definition at line 3556 of file Interp.cpp.
References clang::interp::PointerPathEntry::array(), diagnoseArrayIndex(), clang::interp::InterpState::extendPointerPath(), clang::Type::getAsArrayTypeUnsafe(), clang::interp::OpaquePointer::getSurroundingArray(), clang::QualType::getTypePtr(), clang::isa(), clang::interp::OpaquePointer::isArrayElement(), clang::Type::isArrayType(), clang::interp::PointerPathEntry::negativeArray(), clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::interp::OpaquePointer::withFieldType(), and clang::interp::OpaquePointer::withPath().
Referenced by ArrayDecay(), arrayElemPtr(), and interp__builtin_is_aligned_up_down().
|
inline |
Definition at line 3499 of file Interp.h.
References arrayElemPtr(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 162 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::deref(), clang::interp::Boolean::from(), INT_TYPE_SWITCH_NO_BOOL, PT_Bool, PT_IntAP, PT_IntAPS, and clang::T.
Referenced by interp__builtin_carryop(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_pack(), and interp__builtin_overflowop().
|
inline |
Definition at line 3810 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocation(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
static |
This is used to implement speculative execution via __builtin_constant_p when we generate bytecode.
The setup here is that we use the same tailcall mechanism for speculative evaluation that we use for the regular one. Since each speculative execution ends with an EndSpeculation opcode, that one does NOT call InterpNext() but simply returns true. This way, we return back to this function when we see an EndSpeculation, OR (of course), when we encounter an error and one of the opcodes returns false.
Definition at line 3849 of file Interp.cpp.
References align(), CheckBCPResult(), clang::interp::InterpStack::clearTo(), clang::interp::InterpStack::discard(), EndSpeculation(), Fn, clang::interp::Integral< Bits, Signed >::from(), clang::interp::InterpState::inConstantContext(), InterpFunctions, clang::Invalid, OpReturns(), clang::interp::InterpState::PC, clang::interp::InterpStack::pop(), PopIgnoreDiags(), PRESERVE_NONE, PT_Ptr, clang::interp::InterpStack::push(), PushIgnoreDiags(), clang::interp::CodePtr::read(), clang::interp::InterpStack::size(), clang::interp::InterpState::SpeculationDepth, clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
| bool clang::interp::BitAnd | ( | InterpState & | S | ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS & RHS' on the stack
Definition at line 673 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 4122 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), DoBitCastPtr(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isArrayRoot(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 4049 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpState::allocFloat(), clang::interp::Floating::bitcastFromMemory(), clang::ASTContext::BoolTy, CheckBitCast(), CheckLoad(), clang::interp::InterpState::Current, DoBitCast(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Bits::getQuantity(), clang::interp::InterpFrame::getSource(), clang::Type::isNullPtrType(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::BitOr | ( | InterpState & | S | ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS | RHS' on the stack
Definition at line 698 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::BitXor | ( | InterpState & | S | ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS ^ RHS' on the stack
Definition at line 723 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::Call | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Function * | Func, | ||
| uint32_t | VarArgSize ) |
Definition at line 2131 of file Interp.cpp.
References clang::AK_MemberCall, align(), clang::interp::InterpState::allocFrame(), CheckActive(), CheckCallable(), CheckCallDepth(), checkConstructor(), checkDestructor(), clang::interp::State::checkingPotentialConstantExpression(), CheckInvoke(), cleanupAfterFunctionCall(), compileFunction(), clang::interp::InterpState::Current, clang::interp::InterpState::enterFrame(), clang::interp::InterpState::exitFrame(), clang::Func, clang::interp::InterpFrame::getFunction(), clang::interp::State::getLangOpts(), clang::interp::InterpState::InitializingPtrs, Interpret(), clang::Invalid, clang::interp::Pointer::isDummy(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::Pointer::isZero(), clang::interp::InterpState::PC, clang::interp::InterpStack::peek(), primSize(), PT_Ptr, RVOPtr(), clang::interp::InterpState::Stk, clang::Success, and clang::interp::Pointer::view().
Referenced by interp__builtin_abs(), interp__builtin_addressof(), interp__builtin_arithmetic_fence(), interp__builtin_assume(), interp__builtin_assume_aligned(), interp__builtin_atomic_lock_free(), interp__builtin_bswap(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_fp_binop(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_int_unaryop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_triop(), interp__builtin_elementwise_triop_fp(), interp__builtin_expect(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_addsub(), interp__builtin_ia32_bmac(), interp__builtin_ia32_cmp_mask(), interp__builtin_ia32_crc32(), interp__builtin_ia32_cvt_mask2vec(), interp__builtin_ia32_cvt_vec2mask(), interp__builtin_ia32_cvtpd2ps(), interp__builtin_ia32_cvtsd2ss(), interp__builtin_ia32_dbpsadbw(), interp__builtin_ia32_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_gfni_mul(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_mpsadbw(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_psadbw(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shift_with_count(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_test_op(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_ia32_vpconflict(), interp__builtin_ia32_vpdp(), interp__builtin_inf(), interp__builtin_infer_alloc_token(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_is_within_lifetime(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_load8(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_move(), interp__builtin_nan(), interp__builtin_object_size(), interp__builtin_operator_delete(), interp__builtin_operator_new(), interp__builtin_os_log_format_buffer_size(), interp__builtin_overflowop(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_scalar_fp_round_mask_binop(), interp__builtin_signbit(), interp__builtin_stdc_memreverse8(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_floating_comparison(), and InterpretBuiltin().
| bool clang::interp::CallBI | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const CallExpr * | CE, | ||
| uint32_t | BuiltinID ) |
Definition at line 2595 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), and InterpretBuiltin().
| bool clang::interp::CallPtr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | ArgSize, | ||
| const CallExpr * | CE ) |
Definition at line 2606 of file Interp.cpp.
References align(), Call, CallVirt(), CheckCallable(), CheckNonNullArgs(), clang::interp::Context::classify(), compileFunction(), clang::interp::InterpState::Ctx, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::CallExpr::getCallee(), clang::CallExpr::getCallReturnType(), clang::interp::Function::getDecl(), clang::Type::getPointeeType(), clang::FunctionDecl::getReturnType(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::interp::Function::getWrittenArgSize(), clang::interp::Function::hasExplicitThisPointer(), clang::interp::Function::hasNonNullAttr(), clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(), clang::Invalid, clang::interp::Function::isFullyCompiled(), clang::Type::isPointerType(), clang::interp::Function::isVirtual(), clang::interp::InterpStack::pop(), primSize(), PT_Ptr, and clang::interp::InterpState::Stk.
| bool clang::interp::CallVar | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Function * | Func, | ||
| uint32_t | VarArgSize ) |
Definition at line 2090 of file Interp.cpp.
References clang::interp::InterpState::allocFrame(), CheckCallable(), CheckCallDepth(), clang::interp::State::checkingPotentialConstantExpression(), CheckInvoke(), compileFunction(), clang::interp::InterpState::Current, clang::interp::InterpState::enterFrame(), clang::interp::InterpState::exitFrame(), clang::Func, clang::interp::InterpFrame::getFunction(), Interpret(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::InterpState::PC, clang::interp::InterpStack::peek(), primSize(), PT_Ptr, clang::interp::InterpState::Stk, and clang::Success.
| bool clang::interp::CallVirt | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Function * | Func, | ||
| uint32_t | VarArgSize ) |
Definition at line 2494 of file Interp.cpp.
References Call, clang::cast(), clang::Type::castAsCXXRecordDecl(), clang::interp::State::CCEDiag(), clang::interp::Context::collectBaseOffset(), clang::interp::InterpState::Current, diagnoseCallableDecl(), clang::interp::State::FFDiag(), clang::Func, clang::Type::getAsRecordDecl(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getDynamicDecl(), clang::interp::InterpFrame::getExpr(), clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::Context::getOrCreateFunction(), clang::interp::Context::getOverridingFunction(), clang::Type::getPointeeType(), GetPtrBasePop(), clang::FunctionDecl::getReturnType(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), clang::interp::Descriptor::getType(), clang::ASTContext::hasSimilarType(), clang::interp::Pointer::isBlockPointer(), clang::CXXRecordDecl::isDerivedFrom(), clang::interp::Pointer::isOpaquePointer(), clang::Type::isPointerOrReferenceType(), clang::FunctionDecl::isPureVirtual(), clang::CXXMethodDecl::isVirtual(), clang::interp::State::Note(), clang::interp::InterpStack::peek(), primSize(), PT_Ptr, clang::interp::InterpState::Stk, and clang::interp::Pointer::stripBaseCasts().
Referenced by CallPtr().
| bool clang::interp::Cast | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2839 of file Interp.h.
References AddrLabelDiff, CheckIntegralAddressCast(), clang::Invalid, isIntegralOrPointer(), Number, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3160 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastAP | ( | InterpState & | S, |
| 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 2895 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastAPS | ( | InterpState & | S, |
| uint32_t | BitWidth ) |
Definition at line 2914 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastAPToOffsetIndex | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2936 of file Interp.h.
References clang::interp::Integral< Bits, Signed >::from(), clang::Invalid, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 3385 of file Interp.cpp.
References clang::interp::InterpState::allocMemberPointerPath(), clang::TagDecl::getCanonicalDecl(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by CastMemberPtrBasePop(), and CastMemberPtrDerivedPop().
|
inline |
Definition at line 2877 of file Interp.h.
References handleFixedPointOverflow(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 3089 of file Interp.h.
References clang::interp::InterpState::allocFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 3099 of file Interp.h.
References handleOverflow(), Int, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inlinestatic |
Definition at line 3073 of file Interp.h.
References clang::Float, clang::interp::FixedPoint::from(), handleFixedPointOverflow(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastFloatingIntegral | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FPOI ) |
Definition at line 2967 of file Interp.h.
References clang::interp::State::CCEDiag(), CheckFloatResult(), clang::interp::Floating::convertToInteger(), clang::interp::InterpState::Current, clang::interp::Floating::getAPFloat(), clang::interp::InterpFrame::getExpr(), clang::FPOptions::getFromOpaqueInt(), clang::Expr::getType(), clang::interp::Floating::isNonZero(), clang::interp::State::noteUndefinedBehavior(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastFloatingIntegralAP | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth, | ||
| uint32_t | FPOI ) |
Definition at line 3544 of file Interp.cpp.
References floatAPCast(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastFloatingIntegralAPS | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth, | ||
| uint32_t | FPOI ) |
Definition at line 3550 of file Interp.cpp.
References floatAPCast(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
1) Pops a Floating from the stack.
2) Pushes a new floating on the stack that uses the given semantics.
Definition at line 2868 of file Interp.h.
References clang::interp::InterpState::allocFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::interp::Floating::toSemantics().
|
inlinestatic |
Definition at line 3057 of file Interp.h.
References clang::interp::FixedPoint::from(), handleFixedPointOverflow(), Int, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastIntegralFloating | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const llvm::fltSemantics * | Sem, | ||
| uint32_t | FPOI ) |
Definition at line 2946 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::interp::Floating::fromIntegral(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastMemberPtrBasePop | ( | InterpState & | S, |
| int32_t | Off, | ||
| const RecordDecl * | BaseDecl ) |
DerivedToBaseMemberPointer.
Definition at line 3440 of file Interp.cpp.
References appendToMemberPointer(), castBackMemberPointer(), clang::Off, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastMemberPtrDerivedPop | ( | InterpState & | S, |
| int32_t | Off, | ||
| const RecordDecl * | BaseDecl ) |
BaseToDerivedMemberPointer.
Definition at line 3452 of file Interp.cpp.
References appendToMemberPointer(), castBackMemberPointer(), clang::Off, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2486 of file Interp.h.
References clang::interp::InterpState::Ctx, clang::Invalid, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastPointerIntegral | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 3020 of file Interp.h.
References Address, BlockAddress, CheckPointerToIntegralCast(), ExprAddress, FunctionAddress, clang::Invalid, clang::isa(), isIntegralOrPointer(), LabelAddress, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CastPointerIntegralAP | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
Definition at line 3027 of file Interp.cpp.
References clang::interp::InterpState::allocAP(), CheckPointerToIntegralCast(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastPointerIntegralAPS | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
Definition at line 3040 of file Interp.cpp.
References clang::interp::InterpState::allocAP(), CheckPointerToIntegralCast(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 444 of file Interp.cpp.
References CheckActive().
|
static |
Definition at line 362 of file Interp.cpp.
References clang::C, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::PtrView::getBase(), clang::interp::PtrView::getRecord(), clang::interp::InterpFrame::getSource(), clang::interp::PtrView::isActive(), and clang::interp::PtrView::isRoot().
Referenced by Call(), CheckActive(), checkDestructor(), CheckFinalLoad(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
Definition at line 50 of file Primitives.h.
References clang::T.
Referenced by clang::interp::Char< false >::add(), and clang::interp::Integral< Bits, false >::add().
|
inlinestatic |
Definition at line 4031 of file Interp.h.
References clang::interp::InterpState::maybeDiagnoseDanglingAllocations().
| bool clang::interp::CheckArray | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if the array is offsetable.
Definition at line 476 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), and clang::interp::InterpFrame::getSource().
Referenced by arrayElemPtr(), getField(), InitBitField(), InitBitFieldActivate(), InitField(), InitFieldActivate(), interp__builtin_strlen(), and OffsetHelper().
|
inline |
Check if the destination array we're initializing can hold the NumElems elements.
Definition at line 3911 of file Interp.h.
References CheckArraySize(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 51 of file EvaluationResult.cpp.
References clang::interp::PtrView::allElementsInitialized(), clang::interp::PtrView::atIndex(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::Descriptor::ElemDesc, clang::interp::Descriptor::ElemRecord, clang::interp::PtrView::getField(), clang::interp::PtrView::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::isArray(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::PtrView::narrow(), and clang::Result.
Referenced by CheckArrayInitialized(), CheckFieldsInitialized(), and clang::interp::EvaluationResult::checkFullyInitialized().
| bool clang::interp::CheckArraySize | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| SizeT | NumElements, | ||
| unsigned | ElemSize, | ||
| bool | IsNoThrow ) |
Definition at line 154 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ConstantArrayType::getMaxSizeBits(), clang::interp::InterpFrame::getSource(), clang::Invalid, clang::interp::Descriptor::MaxArrayElemBytes, and SizeT.
|
inline |
Definition at line 119 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), and clang::interp::State::Note().
Referenced by AllocCN(), AllocN(), CheckArrayDestSize(), and interp__builtin_operator_new().
| bool clang::interp::CheckBCPResult | ( | InterpState & | S, |
| const Pointer & | Ptr ) |
Definition at line 342 of file Interp.cpp.
References clang::isa().
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
| bool clang::interp::CheckBitCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | HasIndeterminateBits, | ||
| bool | TargetIsUCharOrByte ) |
Definition at line 3053 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::Stmt::getSourceRange(), and clang::Expr::getType().
| bool clang::interp::CheckBitCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | TargetType, | ||
| bool | SrcIsVoidPtr ) |
Definition at line 1971 of file Interp.cpp.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::Type::getAsRecordDecl(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::getStdAllocatorCaller(), clang::ASTContext::hasSimilarType(), clang::Type::isIntegerType(), clang::Type::isRecordType(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
Referenced by BitCastPrim().
|
static |
Definition at line 1225 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Definition, diagnoseCallableDecl(), clang::interp::Function::getDecl(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), clang::Decl::hasAttr(), clang::FunctionDecl::hasBody(), clang::interp::Function::hasBody(), clang::FunctionDecl::isConstexpr(), clang::interp::Function::isConstexpr(), clang::interp::Function::isValid(), clang::interp::Function::isVirtual(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Definition at line 1249 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpState::FrameDepth, clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
| bool clang::interp::CheckConst | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if a pointer points to const storage.
Definition at line 682 of file Interp.cpp.
References CheckConst().
|
static |
Definition at line 628 of file Interp.cpp.
References clang::QualType::addConst(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::InitializingPtrs, and V.
Referenced by CheckConst(), CheckNewTypeMismatch(), CheckStore(), Dec(), DecBitfield(), Decf(), DecfPop(), DecPop(), DecPopBitfield(), Inc(), IncBitfield(), Incf(), IncfPop(), IncPop(), IncPopBitfield(), PreDec(), PreDecBitfield(), PreInc(), and PreIncBitfield().
| bool clang::interp::CheckConstant | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Descriptor * | Desc, | ||
| AccessKinds | AK ) |
Checks if the Descriptor is of a constexpr or const global variable.
Definition at line 514 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::State::CCEDiag(), clang::interp::InterpState::checkingConstantDestruction(), clang::interp::InterpState::Current, diagnoseNonConstVariable(), clang::interp::InterpState::EvaluatingDecl, clang::interp::State::getASTContext(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), clang::Invalid, clang::VarDecl::isConstexpr(), clang::interp::State::Note(), and clang::T.
Referenced by CheckConstant(), CheckConstant(), CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), and CheckLoad().
|
static |
Definition at line 572 of file Interp.cpp.
References clang::AK_Read, CheckConstant(), and clang::interp::InterpState::checkingConstantDestruction().
|
static |
Definition at line 584 of file Interp.cpp.
References clang::AK_Read, CheckConstant(), and clang::interp::InterpState::checkingConstantDestruction().
|
static |
Definition at line 1880 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::Descriptor::ElemRecord, clang::interp::State::FFDiag(), clang::Func, clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), and clang::interp::Record::getNumVirtualBases().
Referenced by Call().
|
inline |
Definition at line 3890 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::EvaluatingDecl, clang::interp::State::getASTContext(), clang::Decl::getLocation(), clang::VarDecl::getTSCSpec(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isUsableInConstantExpressions(), and clang::TSCS_unspecified.
| 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 1377 of file Interp.cpp.
References diagnoseUnknownDecl(), clang::interp::InterpState::diagnosing(), and clang::DeclRefExpr::getDecl().
Referenced by InvalidDeclRef().
| bool clang::interp::CheckDeleteSource | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.
Definition at line 1363 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getSource(), and noteValueLocation().
Referenced by Free().
|
inline |
Definition at line 4148 of file Interp.h.
References checkDestructor(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::checkDestructor | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Definition at line 1920 of file Interp.cpp.
References clang::AK_Destroy, CheckActive(), clang::interp::InterpState::checkingConstantDestruction(), CheckLifetime(), CheckLive(), CheckRange(), CheckTemporary(), clang::interp::InterpState::Current, Destroyed, diagnoseOutOfLifetimeDestroy(), Ended, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), and clang::interp::InterpFrame::getSource().
Referenced by Call(), CheckDestruction(), and PseudoDtor().
| 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 200 of file Interp.h.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getSource(), clang::Expr::getType(), isIntegralOrPointer(), and clang::T.
| bool clang::interp::CheckDummy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Checks if a pointer is a dummy pointer.
Definition at line 1417 of file Interp.cpp.
References diagnoseDummy().
Referenced by EndLifetime(), interp__builtin_is_within_lifetime(), interp__builtin_strlen(), and MarkDestroyed().
| bool clang::interp::CheckDynamicMemoryAllocation | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks if dynamic memory allocation is available in the current language mode.
Definition at line 1336 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 3854 of file Interp.h.
References diagnoseEnumValue(), clang::interp::InterpState::inConstantContext(), clang::EnumDecl::isFixed(), clang::interp::InterpStack::peek(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 470 of file Interp.cpp.
References CheckExtern(), clang::interp::Block::isExtern(), and Pointer.
|
static |
Definition at line 451 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), diagnoseNonConstVariable(), clang::interp::InterpState::EvaluatingDecl, and clang::interp::State::getLangOpts().
Referenced by CheckExtern(), CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
|
static |
Definition at line 87 of file EvaluationResult.cpp.
References clang::interp::PtrView::atField(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::State::FFDiag(), clang::interp::PtrView::getDeclDesc(), clang::interp::PtrView::getFieldDesc(), clang::interp::Descriptor::getLocation(), clang::interp::PtrView::getRecord(), clang::interp::PtrView::isActive(), clang::interp::Descriptor::isArray(), clang::Type::isIncompleteArrayType(), clang::interp::PtrView::isInitialized(), clang::interp::Descriptor::isRecord(), and clang::Result.
Referenced by CheckArrayInitialized(), CheckFieldsInitialized(), and clang::interp::EvaluationResult::checkFullyInitialized().
| bool clang::interp::CheckFinalLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
This is not used by any of the opcodes directly.
It's used by EvalEmitter to do the final lvalue-to-rvalue conversion.
Definition at line 1045 of file Interp.cpp.
References clang::AK_Read, CheckActive(), CheckConstant(), CheckExtern(), CheckLifetime(), CheckLive(), CheckMutable(), CheckTemporary(), CheckWeak(), diagnoseDummy(), and diagnoseUninitialized().
| bool clang::interp::CheckFloatResult | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Floating & | Result, | ||
| APFloat::opStatus | Status, | ||
| FPOptions | FPO ) |
Checks if the result of a floating-point operation is valid in the current context.
Notes:
Definition at line 1316 of file Interp.cpp.
References clang::interp::State::CCEDiag(), CheckFloatStatus(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::State::noteUndefinedBehavior(), and clang::Result.
Referenced by Addf(), CastFloatingIntegral(), CastIntegralFloating(), Divf(), floatAPCast(), IncDecFloatHelper(), Mulf(), and Subf().
| bool clang::interp::CheckFloatStatus | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| APFloat::opStatus | Status, | ||
| FPOptions | FPO ) |
Check if the given floating-point evaluation status is allowed for compile-time constant folding during translation (as opposed to mandatory constant expression evaluation).
Definition at line 1280 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::LangOptionsBase::FPE_Ignore, clang::FPOptions::getExceptionMode(), clang::FPOptions::getRoundingMode(), clang::interp::InterpFrame::getSource(), and clang::interp::InterpState::inConstantContext().
Referenced by CheckFloatResult().
| bool clang::interp::CheckFunctionDecl | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const FunctionDecl * | FD ) |
Opcode. Check if the function decl can be called at compile time.
Definition at line 1956 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Definition, diagnoseCallableDecl(), clang::FunctionDecl::hasBody(), clang::interp::InterpFrame::isBottomFrame(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Check if the given function pointer can be returned from an evaluation.
Definition at line 304 of file EvaluationResult.cpp.
References clang::interp::State::FFDiag(), clang::interp::FunctionPointer::Func, clang::interp::Function::getDecl(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Type::isAnyPointerType(), isForManglingOnly(), clang::FunctionDecl::isImmediateFunction(), and clang::interp::State::Note().
Referenced by clang::interp::EvaluationResult::checkFunctionPointer(), clang::interp::EvaluationResult::checkLValue(), and lval().
| bool clang::interp::CheckGlobalLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Block * | B ) |
Checks a direct load of a primitive value from a global or local variable.
Definition at line 870 of file Interp.cpp.
References clang::AK_Read, clang::interp::Descriptor::asValueDecl(), CheckConstant(), CheckExtern(), CheckTemporary(), CheckWeak(), clang::interp::InterpState::Current, diagnoseUninitialized(), clang::interp::State::FFDiag(), clang::interp::Block::getBlockDesc(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::interp::InterpFrame::getLocation(), Initialized, clang::Invalid, clang::interp::Block::isAccessible(), clang::interp::Block::isExtern(), clang::interp::Descriptor::IsVolatile, and clang::interp::State::Note().
Referenced by GetGlobal().
| bool clang::interp::CheckInit | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if a value can be initialized.
Definition at line 1133 of file Interp.cpp.
References clang::AK_Assign, CheckLive(), and CheckRange().
| bool clang::interp::CheckIntegralAddressCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| unsigned | BitWidth ) |
Definition at line 3022 of file Interp.cpp.
References clang::Default, clang::interp::State::getASTContext(), clang::TargetInfo::getPointerWidth(), and clang::ASTContext::getTargetInfo().
Referenced by Cast(), and CheckPointerToIntegralCast().
|
static |
Definition at line 1120 of file Interp.cpp.
References clang::AK_MemberCall, CheckLifetime(), CheckLive(), and CheckRange().
|
static |
Definition at line 846 of file Interp.cpp.
References CheckLifetime().
|
static |
Definition at line 834 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), LT(), noteValueLocation(), and Started.
Referenced by checkDestructor(), CheckFinalLoad(), CheckInvoke(), CheckLifetime(), CheckLoad(), CheckLocalLoad(), CheckNewTypeMismatch(), and CheckStore().
| bool clang::interp::CheckLiteralType | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | T ) |
Definition at line 1633 of file Interp.cpp.
References clang::interp::Descriptor::asDecl(), clang::interp::InterpState::Current, clang::interp::InterpState::EvaluatingDecl, clang::interp::State::FFDiag(), clang::interp::Pointer::getDeclDesc(), clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getFunction(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getThis(), clang::Expr::getType(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::Function::isConstructor(), and clang::T.
| bool clang::interp::CheckLive | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Checks if a pointer is live and accessible.
Definition at line 484 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::CSK_Field, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), and noteValueLocation().
Referenced by checkDestructor(), CheckFinalLoad(), CheckInit(), CheckInvoke(), CheckNewTypeMismatch(), CheckStore(), InitElem(), InitElemPop(), interp__builtin_is_within_lifetime(), interp__builtin_strcmp(), and interp__builtin_strlen().
| bool clang::interp::CheckLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Checks if a value can be loaded from a block.
Definition at line 1014 of file Interp.cpp.
References CheckConstant(), CheckLoad(), CheckRange(), clang::CSK_Field, clang::interp::InterpState::Current, diagnoseDummy(), diagnoseUninitialized(), clang::interp::State::FFDiag(), and clang::interp::InterpFrame::getSource().
| bool clang::interp::CheckLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| PtrView | Ptr, | ||
| AccessKinds | AK ) |
Definition at line 933 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), CheckActive(), CheckConstant(), CheckExtern(), clang::interp::State::checkingPotentialConstantExpression(), CheckLifetime(), CheckMutable(), CheckRange(), CheckTemporary(), CheckVolatile(), CheckWeak(), clang::CSK_Field, clang::interp::InterpState::Current, diagnoseUninitialized(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getLocation(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::Type::isArrayType(), clang::interp::State::Note(), and noteValueLocation().
Referenced by ArrayElem(), ArrayElemPop(), BitCast(), BitCastPrim(), CheckLoad(), CopyArray(), Dec(), DecBitfield(), Decf(), DecfPop(), DecPop(), DecPopBitfield(), GetField(), GetFieldPop(), GetThisField(), Inc(), IncBitfield(), Incf(), IncfPop(), IncPop(), IncPopBitfield(), interp__builtin_ia32_cvtpd2ps(), interp__builtin_ia32_cvtsd2ss(), interp__builtin_load8(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_nan(), interp__builtin_stdc_memreverse8(), Load(), LoadPop(), LoadPopL(), Memcpy(), PreDec(), PreDecBitfield(), PreInc(), PreIncBitfield(), and TrivialCopy().
| bool clang::interp::CheckLocalLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Block * | B ) |
Definition at line 901 of file Interp.cpp.
References clang::AK_Read, clang::interp::State::checkingPotentialConstantExpression(), CheckLifetime(), clang::interp::InterpState::Current, diagnoseNonConstVariable(), diagnoseUninitialized(), clang::interp::State::FFDiag(), clang::interp::Block::getBlockDesc(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::interp::InterpFrame::getLocation(), clang::Invalid, clang::interp::InterpFrame::isBottomFrame(), clang::interp::Block::isExtern(), and clang::interp::State::Note().
Referenced by GetLocal().
Definition at line 68 of file Primitives.h.
Referenced by clang::interp::Char< false >::mul(), and clang::interp::Integral< Bits, false >::mul().
|
inline |
Definition at line 81 of file InterpHelpers.h.
References clang::AK_Read, and CheckMutable().
| bool clang::interp::CheckMutable | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| PtrView | Ptr, | ||
| AccessKinds | AK ) |
Checks if a pointer points to a mutable field.
Definition at line 693 of file Interp.cpp.
References clang::interp::InterpState::checkingConstantDestruction(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::PtrView::getBase(), clang::interp::PtrView::getField(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::interp::PtrView::isMutable(), clang::interp::PtrView::isRoot(), clang::interp::InterpState::lifetimeStartedInEvaluation(), and clang::interp::State::Note().
Referenced by CheckFinalLoad(), CheckLoad(), CheckMutable(), CheckStore(), copyRecord(), and interp__builtin_is_within_lifetime().
| bool clang::interp::CheckNewDeleteForms | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| DynamicAllocator::Form | AllocForm, | ||
| DynamicAllocator::Form | DeleteForm, | ||
| const Descriptor * | D, | ||
| const Expr * | NewExpr ) |
Diagnose mismatched new[]/delete or new/delete[] pairs.
Definition at line 1345 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Descriptor::getDataType(), clang::Expr::getExprLoc(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), and clang::interp::State::Note().
Referenced by Free(), and interp__builtin_operator_delete().
| bool clang::interp::CheckNewTypeMismatch | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Expr * | E, | ||
| std::optional< uint64_t > | ArraySize ) |
Check if the initializer and storage types of a placement-new expression match.
Definition at line 2829 of file Interp.cpp.
References clang::AK_Construct, clang::cast(), CheckActive(), CheckConst(), CheckExtern(), CheckGlobal(), CheckLifetime(), CheckLive(), CheckRange(), CheckTemporary(), clang::interp::InterpState::Current, diagnoseDummy(), clang::interp::Pointer::expand(), clang::interp::State::FFDiag(), clang::ASTContext::getAsArrayType(), clang::interp::State::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::ArrayType::getElementType(), clang::interp::InterpFrame::getLocation(), clang::interp::InterpFrame::getSource(), clang::ASTContext::hasSimilarType(), clang::Type::isArrayType(), clang::Normal, clang::interp::InterpStack::peek(), startLifetimeRecurse(), and clang::interp::InterpState::Stk.
Referenced by CheckNewTypeMismatchArray().
| bool clang::interp::CheckNewTypeMismatchArray | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Expr * | E ) |
Definition at line 4041 of file Interp.h.
References CheckNewTypeMismatch(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3839 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocation(), clang::interp::InterpStack::peek(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 1424 of file Interp.cpp.
References align(), clang::interp::State::CCEDiag(), clang::interp::Context::classify(), collectNonNullArgs(), clang::interp::InterpState::Ctx, clang::interp::InterpState::Current, clang::CallExpr::getArgs(), clang::interp::Function::getDecl(), clang::interp::InterpFrame::getLocation(), clang::CallExpr::getNumArgs(), clang::interp::Pointer::isZero(), clang::interp::InterpStack::peek(), primSize(), PT_Ptr, clang::interp::InterpState::Stk, and clang::interp::OptPrimType::value_or().
Referenced by CallPtr().
|
inline |
| bool clang::interp::CheckNull | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| CheckSubobjectKind | CSK ) |
Checks if a pointer is null.
Definition at line 596 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
Referenced by AddOffset(), getBase(), GetField(), getField(), GetFieldPop(), GetPtrDerivedPop(), GetPtrVirtBase(), GetPtrVirtBasePop(), IncDecPtrHelper(), and SubOffset().
| bool clang::interp::CheckPlacementNew | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Expr * | E ) |
Definition at line 2963 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), clang::interp::InterpFrame::isStdFunction(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
| bool clang::interp::CheckPointerToIntegralCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| unsigned | BitWidth ) |
Definition at line 2996 of file Interp.cpp.
References clang::interp::State::CCEDiag(), CheckIntegralAddressCast(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), and clang::Invalid.
Referenced by CastPointerIntegral(), CastPointerIntegralAP(), and CastPointerIntegralAPS().
|
inline |
Definition at line 3803 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 63 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
| 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 607 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
Referenced by ArrayDecay(), checkDestructor(), CheckInit(), CheckInvoke(), CheckLoad(), CheckLoad(), CheckNewTypeMismatch(), CheckRefInit(), CheckStore(), GetField(), getField(), GetFieldPop(), InitBitField(), InitBitFieldActivate(), InitField(), InitFieldActivate(), interp__builtin_nan(), and interp__builtin_strlen().
|
inline |
Checks if a pointer is in range.
Definition at line 53 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 2059 of file Interp.h.
References clang::AK_Read, CheckRange(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| 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 159 of file Interp.h.
References diagnoseShiftFailure(), DiscardsBits, clang::interp::State::getLangOpts(), Left, LT(), NegativeCount, NegativeLeftOperand, and TooLarge.
Referenced by DoShift(), and DoShiftAP().
| bool clang::interp::CheckStore | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK, | ||
| bool | WillBeActivated ) |
Checks if a value can be stored in a block.
Definition at line 1082 of file Interp.cpp.
References CheckActive(), CheckConst(), CheckExtern(), CheckGlobal(), CheckLifetime(), CheckLive(), CheckMutable(), CheckRange(), CheckVolatile(), diagnoseDummy(), clang::interp::PtrView::getLifetime(), and clang::interp::Block::isAccessible().
Referenced by interp__builtin_stdc_memreverse8(), Store(), StoreActivate(), StoreActivatePop(), StoreBitField(), StoreBitFieldActivate(), StoreBitFieldActivatePop(), StoreBitFieldPop(), StorePop(), and TrivialCopy().
| 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 617 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
Referenced by getBase(), getField(), and GetPtrDerivedPop().
Definition at line 59 of file Primitives.h.
References clang::T.
Referenced by clang::interp::Char< false >::sub(), and clang::interp::Integral< Bits, false >::sub().
|
static |
Definition at line 244 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), clang::interp::InterpState::checkingConstantDestruction(), clang::interp::InterpState::Current, clang::interp::InterpState::EvalID, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Block::getDeclID(), clang::interp::Block::getDescriptor(), clang::interp::Block::getEvalID(), clang::interp::InterpFrame::getSource(), clang::interp::Block::isGlobal(), clang::interp::Block::isTemporary(), and noteValueLocation().
Referenced by checkDestructor(), CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), CheckNewTypeMismatch(), and CheckTemporary().
|
static |
Definition at line 270 of file Interp.cpp.
References CheckTemporary().
| bool clang::interp::CheckThis | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks the 'this' pointer.
Definition at line 1260 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::InterpState::diagnosing(), clang::interp::State::FFDiag(), clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::hasThisPointer().
Referenced by GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisBitFieldActivate(), InitThisField(), InitThisFieldActivate(), and This().
|
static |
Definition at line 720 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), clang::interp::Descriptor::asValueDecl(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::PtrView::getBase(), clang::interp::PtrView::getField(), clang::interp::PtrView::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), clang::interp::PtrView::getType(), clang::interp::InterpState::initializingBlock(), clang::Invalid, clang::interp::PtrView::isRoot(), clang::QualType::isVolatileQualified(), and clang::interp::State::Note().
Referenced by CheckLoad(), and CheckStore().
|
static |
Definition at line 853 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Block::getDescriptor(), clang::interp::InterpFrame::getLocation(), clang::interp::Block::isWeak(), and clang::interp::State::Note().
Referenced by CheckFinalLoad(), CheckGlobalLoad(), and CheckLoad().
| void clang::interp::cleanupAfterFunctionCall | ( | InterpState & | S, |
| const Function * | Func ) |
Definition at line 317 of file Interp.cpp.
References clang::interp::InterpFrame::Caller, clang::interp::InterpState::Current, clang::interp::InterpStack::discard(), clang::interp::InterpStack::discardSlow(), clang::Func, clang::interp::Function::getArgSize(), clang::interp::InterpFrame::getArgSize(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpStack::size(), clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
| bool clang::interp::CMP3 | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const ComparisonCategoryInfo * | CmpInfo ) |
Definition at line 1458 of file Interp.h.
References clang::interp::InterpState::Current, clang::Equal, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getSource(), clang::ComparisonCategoryInfo::getValueInfo(), clang::Greater, clang::interp::Pointer::hasSameBase(), clang::Less, clang::ComparisonCategoryInfo::makeWeakResult(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), SetThreeWayComparisonField(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::CmpHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| CompareFn | Fn ) |
Definition at line 1197 of file Interp.h.
References Fn, clang::Invalid, isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
Referenced by CmpHelperEQ(), GE(), GT(), LE(), and LT().
|
inline |
Definition at line 1220 of file Interp.h.
References clang::interp::State::CCEDiag(), Compare(), clang::interp::Pointer::computeOffsetForComparison(), clang::interp::Pointer::computeSplitPoint(), clang::interp::InterpState::Current, clang::Equal, clang::interp::State::FFDiag(), Fn, clang::Decl::getAccess(), clang::interp::State::getASTContext(), clang::FieldDecl::getParent(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::hasSameBase(), clang::Invalid, clang::interp::Pointer::isFunctionPointer(), clang::interp::Pointer::isTypeidPointer(), clang::TagDecl::isUnion(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::Pointer::toDiagnosticString().
| bool clang::interp::CmpHelperEQ | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| CompareFn | Fn ) |
|
inline |
Definition at line 1409 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::MemberPointer::compare(), clang::interp::InterpState::Current, clang::Equal, clang::interp::State::FFDiag(), Fn, clang::interp::Boolean::from(), clang::interp::InterpFrame::getSource(), clang::CXXMethodDecl::isVirtual(), clang::interp::MemberPointer::isZero(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::Unordered.
|
inline |
Definition at line 1285 of file Interp.h.
References arePotentiallyOverlappingStringLiterals(), clang::interp::State::checkingPotentialConstantExpression(), Compare(), clang::interp::Pointer::computeOffsetForComparison(), clang::interp::InterpState::Current, clang::Equal, clang::interp::State::FFDiag(), Fn, clang::interp::State::getASTContext(), clang::interp::Pointer::getIntegerRepresentation(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::hasSameBase(), clang::interp::InterpState::inConstantContext(), clang::isa(), clang::interp::Pointer::isConstexprUnknown(), clang::interp::Pointer::isFunctionPointer(), clang::interp::Pointer::isOnePastEnd(), isOpaqueConstantCall(), clang::interp::Pointer::isStringPointer(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::Pointer::isZero(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::interp::Pointer::toDiagnosticString(), and clang::Unordered.
|
static |
Definition at line 192 of file EvaluationResult.cpp.
References clang::interp::Pointer::block(), collectBlocks(), clang::interp::Descriptor::ElemDesc, clang::interp::Descriptor::ElemRecord, clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Descriptor::isCompositeArray(), isOrHasPtr(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), PT_Ptr, and clang::interp::Pointer::view().
Referenced by clang::interp::EvaluationResult::checkDynamicAllocations(), and collectBlocks().
| llvm::BitVector clang::interp::collectNonNullArgs | ( | const FunctionDecl * | F, |
| ArrayRef< const Expr * > | Args ) |
Definition at line 16 of file InterpShared.cpp.
References clang::Decl::hasAttr(), and clang::Decl::specific_attrs().
Referenced by CheckNonNullArgs(), and clang::interp::Compiler< Emitter >::visitCallArgs().
| bool clang::interp::Comp | ( | InterpState & | S | ) |
1) Pops the value from the stack.
2) Pushes the bitwise complemented value on the stack (~V).
Definition at line 1176 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| ComparisonCategoryResult clang::interp::Compare | ( | const T & | X, |
| const T & | Y ) |
Helper to compare two comparable types.
Definition at line 42 of file Primitives.h.
References clang::Equal, clang::Greater, clang::Less, clang::T, and X.
Referenced by CmpHelper< Pointer >(), CmpHelperEQ< Pointer >(), clang::interp::Boolean::compare(), clang::interp::Char< false >::compare(), clang::interp::Integral< Bits, false >::compare(), and DoShift().
|
static |
Definition at line 2063 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::Definition, Fn, clang::Func, FunctionDefinitionCanBeLazilyInstantiated(), clang::interp::InterpState::getContext(), clang::interp::InterpFrame::getLocation(), clang::interp::State::getSemaProxy(), clang::interp::InterpState::inConstantContext(), clang::SemaProxy::instantiateFunctionDefinition(), and clang::interp::InterpState::P.
| bool clang::interp::Const | ( | InterpState & | S, |
| const T & | Arg ) |
Definition at line 1569 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Integral< Bits, Signed >::from(), needsAlloc(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 1597 of file Interp.h.
References clang::interp::InterpState::allocFloat(), clang::interp::Floating::getAPFloat(), clang::interp::Floating::getSemantics(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 229 of file InterpBuiltin.cpp.
References clang::interp::Pointer::elem(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::Type::isBooleanType(), clang::interp::Descriptor::isPrimitiveArray(), and clang::Result.
Referenced by interp__builtin_clz(), interp__builtin_ctz(), and interp__builtin_popcount().
|
static |
Definition at line 247 of file InterpBuiltin.cpp.
References clang::interp::State::CCEDiag(), clang::interp::Floating::copy(), and clang::interp::InterpState::diagnosing().
Referenced by interp__builtin_ia32_cvtpd2ps(), and interp__builtin_ia32_cvtsd2ss().
|
inline |
Definition at line 3531 of file Interp.h.
References clang::interp::PtrView::atIndex(), CheckLoad(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeElement(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 7184 of file InterpBuiltin.cpp.
References Activate(), clang::interp::PtrView::atIndex(), copyComposite(), copyRecord(), clang::interp::PtrView::deref(), clang::interp::PtrView::elem(), clang::interp::State::getASTContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::PtrView::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::ASTContext::hasSimilarType(), clang::interp::PtrView::initializeElement(), clang::Invalid, clang::interp::Descriptor::isCompositeArray(), clang::interp::PtrView::isLive(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::PtrView::narrow(), PT_Float, clang::T, and TYPE_SWITCH.
Referenced by copyComposite(), copyRecord(), and DoMemcpy().
| bool clang::interp::CopyMemberPtrPath | ( | InterpState & | S, |
| const RecordDecl * | Entry, | ||
| bool | IsDerived ) |
Just append the given Entry to the MemberPointer's path.
This is used to re-inject APValues into the bytecode interpreter.
Definition at line 3507 of file Interp.cpp.
References clang::interp::InterpState::allocMemberPointerPath(), clang::cast(), clang::interp::MemberPointer::getPathLength(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 3234 of file Interp.cpp.
References clang::interp::OpaquePointer::getFieldType(), clang::interp::MemberPointer::getPathLength(), clang::QualType::getTypePtr(), clang::interp::OpaquePointer::isOnePastEnd(), needsAlloc(), clang::interp::InterpState::P, clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, Pointer, clang::T, and clang::interp::OpaquePointer::withPath().
|
static |
Definition at line 3194 of file Interp.cpp.
References clang::interp::OpaquePointer::getFieldType(), clang::interp::MemberPointer::getPathLength(), clang::QualType::getTypePtr(), clang::interp::OpaquePointer::isOnePastEnd(), clang::interp::InterpState::P, clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, Pointer, PT_Float, PT_IntAP, PT_IntAPS, PT_MemberPtr, PT_Ptr, clang::T, and clang::interp::OpaquePointer::withPath().
Referenced by finishGlobalRecurse().
|
static |
Definition at line 7119 of file InterpBuiltin.cpp.
References Activate(), clang::interp::PtrView::activate(), clang::AK_Read, clang::interp::PtrView::atField(), clang::interp::PtrView::block(), CheckMutable(), copyComposite(), copyRecord(), clang::interp::PtrView::deref(), diagnoseUninitialized(), clang::interp::Descriptor::ElemRecord, clang::interp::PtrView::getFieldDesc(), clang::interp::PtrView::getLifetime(), clang::interp::PtrView::initialize(), clang::interp::PtrView::isActive(), clang::interp::PtrView::isInitialized(), clang::interp::Descriptor::isRecord(), clang::T, TYPE_SWITCH, and zeroAll().
Referenced by copyComposite(), and copyRecord().
|
inline |
Abort without a diagnostic if we're checking for a potential constant expression and this is not the bottom frame.
This is used in constructors to allow evaluating their initializers but abort if we encounter anything in their body.
Definition at line 3776 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::isBottomFrame().
| bool clang::interp::Dec | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
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 1040 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
OldPtr -> Integer -> NewPtr.
Definition at line 3866 of file Interp.h.
References isPtrType(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::DecBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| uint32_t | BitWidth ) |
Definition at line 1051 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1153 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1163 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::DecPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
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 1067 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::DecPopBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| uint32_t | BitWidth ) |
Definition at line 1078 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2733 of file Interp.h.
References clang::AK_Decrement, diagnoseUninitialized(), IncDecPtrHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::DefaultInit | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const CXXConstructorDecl * | Ctor ) |
Definition at line 2794 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::CXXMethodDecl::getParent(), clang::interp::InterpFrame::getSource(), initBasesRecurse(), clang::FunctionDecl::isConstexpr(), clang::Decl::isInvalidDecl(), clang::interp::State::Note(), clang::interp::InterpStack::peek(), startLifetimeRecurse(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::visitInitList().
| bool clang::interp::Destroy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 3363 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::InterpState::deallocate(), diagnoseOutOfLifetimeDestroy(), Ended, clang::interp::Block::getBlockDesc(), clang::interp::InterpFrame::getFunction(), clang::interp::LocalInlineDescriptor::getLifetime(), clang::interp::InterpFrame::getLocalBlock(), clang::interp::InterpFrame::getLocalPointer(), clang::interp::Function::getScope(), clang::interp::Block::isInitialized(), Local, and clang::interp::Scope::locals_reverse().
| bool clang::interp::diagnoseArrayIndex | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const APSInt & | Index, | ||
| std::optional< uint64_t > | NumElems, | ||
| bool | IsArray ) |
Definition at line 307 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::getSource().
Referenced by addSubOffsetOpaque(), arrayElemPtrOpaque(), and OffsetHelper().
|
static |
Definition at line 1143 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Definition, clang::interp::InterpState::diagnosing(), clang::interp::State::FFDiag(), clang::NamedDecl::getIdentifier(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::interp::InterpFrame::getLocation(), clang::NamedDecl::getName(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::hasBody(), clang::Invalid, clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefined(), clang::Decl::isInvalidDecl(), clang::SourceLocation::isMacroID(), clang::interp::State::Note(), and clang::SC_Extern.
Referenced by CallVirt(), CheckCallable(), and CheckFunctionDecl().
| bool clang::interp::diagnoseDummy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Definition at line 1400 of file Interp.cpp.
References clang::AK_Decrement, clang::AK_Destroy, clang::AK_Increment, clang::AK_Read, clang::interp::InterpState::Current, diagnoseUnknownDecl(), clang::interp::InterpState::diagnosing(), clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
Referenced by CheckDummy(), CheckFinalLoad(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
| void clang::interp::diagnoseEnumValue | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const EnumDecl * | ED, | ||
| const APSInt & | Value ) |
Definition at line 1612 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocation(), clang::EnumDecl::getNumNegativeBits(), clang::EnumDecl::getValueRange(), clang::Max, and clang::Min.
Referenced by CheckEnumValue().
|
static |
Definition at line 206 of file InterpBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpState::diagnosing(), clang::interp::State::getASTContext(), clang::interp::State::getLangOpts(), clang::Builtin::Context::getQuotedName(), and clang::interp::InterpFrame::getSource().
Referenced by interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_strcmp(), and interp__builtin_strlen().
|
static |
Definition at line 1904 of file Interp.cpp.
References clang::cast(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), and Started.
Referenced by checkDestructor(), and Destroy().
| LLVM_ATTRIBUTE_NOINLINE bool clang::interp::diagnoseShiftFailure | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| ShiftFailure | Failure, | ||
| const APSInt * | Value, | ||
| unsigned | Bits ) |
Definition at line 280 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, DiscardsBits, Failure, clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getSource(), clang::Expr::getType(), NegativeCount, NegativeLeftOperand, clang::interp::State::noteUndefinedBehavior(), and TooLarge.
Referenced by CheckShift().
|
static |
Definition at line 1665 of file Interp.cpp.
References clang::AK_Read, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getPrintingPolicy(), clang::interp::Context::getRecord(), clang::interp::InterpFrame::getSource(), and clang::QualType::print().
Referenced by getField().
| bool clang::interp::diagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | Extern, | ||
| const Block * | B, | ||
| Lifetime | LT, | ||
| AccessKinds | AK ) |
Definition at line 775 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, diagnoseMissingInitializer(), diagnoseNonConstVariable(), clang::interp::InterpState::EvaluatingDecl, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::VarDecl::isStaticDataMember(), LT(), clang::interp::State::Note(), noteValueLocation(), and Started.
| bool clang::interp::diagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Definition at line 767 of file Interp.cpp.
References diagnoseUninitialized().
Referenced by CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), CheckLoad(), CheckLocalLoad(), copyRecord(), DecPtr(), diagnoseUninitialized(), diagnoseUninitialized(), DynamicCast(), GetGlobalUnchecked(), GetRefGlobal(), and IncPtr().
|
static |
Definition at line 826 of file Interp.cpp.
References diagnoseUninitialized().
|
static |
Definition at line 38 of file EvaluationResult.cpp.
References clang::interp::State::FFDiag(), clang::Decl::getLocation(), and clang::interp::State::Note().
Referenced by CheckArrayInitialized(), and CheckFieldsInitialized().
|
static |
Definition at line 220 of file InterpBuiltin.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getSource(), and noteValueLocation().
Referenced by interp__builtin_is_within_lifetime(), and interp__builtin_memcpy().
| bool clang::interp::DiagTypeid | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 3135 of file Interp.cpp.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::getExpr().
|
static |
Definition at line 70 of file InterpBuiltin.cpp.
References clang::interp::InterpStack::discard(), clang::T, and TYPE_SWITCH.
Referenced by interp__builtin_expect(), interp__builtin_infer_alloc_token(), interp__builtin_operator_delete(), interp__builtin_operator_new(), clang::interp::Compiler< Emitter >::visit(), clang::interp::Compiler< Emitter >::VisitAbstractConditionalOperator(), clang::interp::Compiler< Emitter >::VisitArrayInitLoopExpr(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitCallExpr(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitComplexUnaryOperator(), clang::interp::Compiler< Emitter >::VisitCompoundLiteralExpr(), clang::interp::Compiler< Emitter >::visitCXXForRangeStmt(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::visitForStmt(), clang::interp::Compiler< Emitter >::visitInitList(), clang::interp::Compiler< Emitter >::VisitMaterializeTemporaryExpr(), clang::interp::Compiler< Emitter >::VisitMemberExpr(), clang::interp::Compiler< Emitter >::VisitObjCBoxedExpr(), clang::interp::Compiler< Emitter >::VisitOffsetOfExpr(), clang::interp::Compiler< Emitter >::VisitPseudoObjectExpr(), clang::interp::Compiler< Emitter >::visitStmt(), clang::interp::Compiler< Emitter >::VisitUnaryOperator(), and clang::interp::Compiler< Emitter >::VisitVectorUnaryOperator().
| 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 771 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckDivRem(), handleFixedPointOverflow(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 580 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpState::allocFloat(), clang::C, clang::interp::Floating::copy(), clang::interp::InterpState::Current, clang::interp::Pointer::elem(), clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), HandleComplexComplexDiv(), needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 797 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckDivRem(), CheckFloatResult(), clang::interp::Floating::div(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::DoBitCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| std::byte * | Buff, | ||
| Bits | BitWidth, | ||
| Bits | FullBitWidth, | ||
| bool & | HasIndeterminateBits ) |
Definition at line 419 of file InterpBuiltinBitCast.cpp.
References Big, checkBitcastType(), clang::interp::BitcastBuffer::copyBits(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getTargetInfo(), clang::interp::Bits::isFullByte(), clang::TargetInfo::isLittleEndian(), Little, clang::interp::BitcastBuffer::rangeInitialized(), readPointerToBuffer(), clang::interp::Bits::roundToBytes(), clang::Success, swapBytes(), and clang::interp::Bits::zero().
Referenced by BitCastPrim().
| bool clang::interp::DoBitCastPtr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | FromPtr, | ||
| Pointer & | ToPtr ) |
Definition at line 452 of file InterpBuiltinBitCast.cpp.
References DoBitCastPtr(), clang::interp::State::getASTContext(), clang::CharUnits::getQuantity(), clang::interp::Pointer::getType(), and clang::ASTContext::getTypeSizeInChars().
Referenced by BitCast(), and DoBitCastPtr().
| bool clang::interp::DoBitCastPtr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | FromPtr, | ||
| Pointer & | ToPtr, | ||
| size_t | Size ) |
Definition at line 460 of file InterpBuiltinBitCast.cpp.
References clang::interp::InterpState::allocAP(), Big, BITCAST_TYPE_SWITCH_FIXED_SIZE, clang::interp::IntegralAP< Signed >::bitcastFromMemory(), checkBitcastType(), clang::interp::BitcastBuffer::copyBits(), clang::interp::InterpState::Current, clang::interp::PtrView::deref(), enumeratePointerFields(), Failure, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getDataType(), clang::interp::InterpFrame::getExpr(), clang::interp::PtrView::getField(), clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::Bits::getQuantity(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::if(), clang::interp::PtrView::initialize(), Initialized, clang::FieldDecl::isBitField(), clang::interp::Pointer::isBlockPointer(), clang::TargetInfo::isLittleEndian(), clang::interp::Pointer::isLive(), Little, clang::Memory, PT_Bool, PT_IntAP, PT_IntAPS, clang::interp::BitcastBuffer::rangeInitialized(), readPointerToBuffer(), clang::Result, clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), Skip, clang::Success, Success, swapBytes(), and clang::T.
| bool clang::interp::DoMemcpy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Src, | ||
| Pointer & | Dest, | ||
| bool | Activate, | ||
| bool | Diagnose ) |
Copy the contents of Src into Dest.
Definition at line 7239 of file InterpBuiltin.cpp.
References Activate(), copyComposite(), DoMemcpy(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isPrimitive(), and clang::interp::Pointer::view().
Referenced by DoMemcpy(), interp__builtin_memcpy(), Memcpy(), and TrivialCopy().
| bool clang::interp::DoMemcpy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | SrcPtr, | ||
| const Pointer & | DestPtr, | ||
| Bits | Size ) |
Definition at line 579 of file InterpBuiltinBitCast.cpp.
References clang::interp::Pointer::asStringPointer(), convertToBlockPointer(), enumeratePointerFields(), clang::interp::InterpState::getContext(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isReadablePointerType(), clang::interp::Pointer::isStringPointer(), Pointer, clang::Result, Success, and clang::T.
|
inline |
Definition at line 3223 of file Interp.h.
References clang::interp::State::CCEDiag(), CheckShift(), Compare(), clang::interp::InterpState::Current, DoShift(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::Greater, Left, LT(), needsAlloc(), clang::interp::State::noteUndefinedBehavior(), clang::interp::InterpStack::push(), clang::Result, Right, and clang::interp::InterpState::Stk.
|
inline |
A version of DoShift that works on IntegralAP.
Definition at line 3305 of file Interp.h.
References clang::interp::State::CCEDiag(), CheckShift(), clang::interp::InterpState::Current, DoShiftAP(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), Left, LT(), needsAlloc(), clang::interp::State::noteUndefinedBehavior(), clang::interp::InterpStack::push(), clang::Result, Right, and clang::interp::InterpState::Stk.
Referenced by DoShiftAP(), Shl(), and Shr().
|
inline |
Definition at line 2137 of file Interp.h.
References clang::interp::InterpStack::dump(), and clang::interp::InterpState::Stk.
| bool clang::interp::Dup | ( | InterpState & | S | ) |
Definition at line 1539 of file Interp.h.
References clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::DynamicCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | DestTypePtr, | ||
| bool | IsReferenceCast ) |
Definition at line 2328 of file Interp.cpp.
References clang::CXXBasePath::Access, clang::AK_DynamicCast, clang::AK_Read, clang::Ambiguous, clang::AS_private, clang::CXXBasePaths::begin(), clang::interp::PtrView::block(), clang::cast(), clang::interp::InterpState::Current, diagnoseUninitialized(), clang::CXXBasePaths::end(), clang::interp::State::FFDiag(), findRecordBase(), clang::interp::State::getASTContext(), clang::Type::getCanonicalTypeUnqualified(), clang::interp::InterpFrame::getExpr(), clang::ASTContext::getLValueReferenceType(), clang::interp::PtrView::getRecord(), clang::interp::InterpFrame::getSource(), clang::interp::PtrView::getType(), clang::ASTContext::hasSimilarType(), clang::interp::InterpState::InitializingPtrs, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, clang::T, and V.
|
inline |
Definition at line 2823 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::enableLocal(), and clang::interp::InterpFrame::isLocalEnabled().
|
inline |
Definition at line 3729 of file Interp.h.
References clang::interp::InterpState::InitializingPtrs.
| bool clang::interp::EndLifetime | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the peek'd pointer.
Definition at line 2739 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), Ended, clang::interp::InterpStack::peek(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3737 of file Interp.h.
References PRESERVE_NONE, and clang::interp::InterpState::SpeculationDepth.
Referenced by BCP().
| bool clang::interp::EQ | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1451 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
|
inline |
Do nothing and just abort execution.
Definition at line 3768 of file Interp.h.
Referenced by interp__builtin_is_within_lifetime().
|
static |
Definition at line 3879 of file InterpBuiltin.cpp.
References evalICmpImm().
Referenced by evalICmpImm(), and interp__builtin_ia32_cmp_mask().
| UnsignedOrNone clang::interp::evaluateBuiltinObjectSize | ( | const ASTContext & | ASTCtx, |
| unsigned | Kind, | ||
| Pointer & | Ptr, | ||
| const Expr * | E, | ||
| bool | IsDynamic ) |
Evaluate __builtin_object_size or __builtin_dynamic_object_size for the given pointer and Kind.
When computing the final result, the most important variable is UseClosestSurroundingVariable. If it is true, we will use the field the pointer points to, or the parent array of the element. UseClosestSurroundingVariable is true for Kind 1 and 3.
Definition at line 383 of file InterpBuiltinObjectSize.cpp.
References clang::interp::OpaquePointer::Base, computeFullDescSize(), computeOpaquePtrOffset(), computeOpaqueSize(), computePointerOffset(), clang::findStructFieldAccess(), clang::interp::Descriptor::getDataType(), clang::interp::OpaquePointer::getFieldType(), clang::interp::OpaquePointer::getObjectType(), clang::CharUnits::getQuantity(), clang::interp::DeclOrExpr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::isa(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), clang::Type::isPointerType(), isUserWritingOffTheEnd(), and pointsToCompleteObject().
Referenced by interp__builtin_object_size(), and clang::interp::Context::tryEvaluateObjectSize().
|
static |
Whether the CheckArraySize op rejects an array with NumElems elements.
Definition at line 55 of file Compiler.cpp.
Referenced by clang::interp::Compiler< Emitter >::VisitArrayInitLoopExpr(), and clang::interp::Compiler< Emitter >::VisitCXXConstructExpr().
|
inline |
Definition at line 3441 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 2311 of file Interp.cpp.
References findRecordBase(), clang::ASTContext::getCanonicalTagType(), and clang::ASTContext::hasSimilarType().
Referenced by DynamicCast(), and findRecordBase().
|
static |
Definition at line 3262 of file Interp.cpp.
References copyPrimitiveMemory(), clang::interp::PtrView::deref(), finishGlobalRecurse(), needsAlloc(), clang::T, and TYPE_SWITCH_ALLOC.
Referenced by finishGlobalRecurse(), and FinishInitGlobal().
|
inline |
Definition at line 2115 of file Interp.h.
References clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2121 of file Interp.h.
References clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2128 of file Interp.h.
References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::FinishInitGlobal | ( | InterpState & | S | ) |
Definition at line 3310 of file Interp.cpp.
References finishGlobalRecurse(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2109 of file Interp.h.
References clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Flip | ( | InterpState & | S | ) |
[Value1, Value2] -> [Value2, Value1]
Definition at line 1551 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 3524 of file Interp.cpp.
References clang::interp::InterpState::allocAP(), CheckFloatResult(), clang::interp::Floating::convertToInteger(), clang::interp::IntegralAP< Signed >::copy(), clang::interp::Floating::getAPFloat(), clang::FPOptions::getFromOpaqueInt(), handleOverflow(), clang::interp::Floating::isFinite(), clang::interp::InterpStack::push(), clang::Result, clang::Signed, and clang::interp::InterpState::Stk.
Referenced by CastFloatingIntegralAP(), and CastFloatingIntegralAPS().
|
inlinestatic |
Definition at line 3112 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
| bool clang::interp::Free | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | DeleteIsArrayForm, | ||
| bool | IsGlobalDelete ) |
Definition at line 1511 of file Interp.cpp.
References clang::interp::DynamicAllocator::Array, CheckDeleteSource(), CheckDynamicMemoryAllocation(), CheckNewDeleteForms(), clang::interp::InterpState::Current, clang::interp::DynamicAllocator::deallocate(), clang::interp::State::FFDiag(), clang::interp::DynamicAllocator::getAllocationForm(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::Block::getDescriptor(), clang::interp::InterpFrame::getSource(), getVirtualOperatorDelete(), hasVirtualDestructor(), clang::isa(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::interp::DynamicAllocator::NonArray, clang::interp::InterpStack::pop(), RunDestructors(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::GE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1527 of file Interp.h.
References CmpHelper(), clang::Equal, and clang::Greater.
|
static |
Definition at line 1769 of file Interp.cpp.
References clang::interp::PointerPathEntry::base(), clang::cast(), CheckNull(), CheckSubobject(), clang::CSK_Base, clang::interp::InterpState::Ctx, clang::interp::InterpState::extendPointerPath(), clang::Type::getAsRecordDecl(), clang::interp::State::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::interp::InterpState::getContext(), clang::interp::OpaquePointer::getFieldType(), clang::interp::Context::getRecord(), clang::CanQual< T >::getTypePtr(), clang::Off, clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::interp::OpaquePointer::withPath().
Referenced by GetPtrBase(), and GetPtrBasePop().
|
static |
Returns the alignment of the object Ptr points into.
Definition at line 1463 of file InterpBuiltin.cpp.
References GetAlignOfExpr(), and clang::ASTContext::getDeclAlign().
Referenced by interp__builtin_assume_aligned(), and interp__builtin_load8().
Definition at line 31 of file Compiler.cpp.
References clang::APValue::Int.
Referenced by clang::interp::Compiler< Emitter >::VisitAbstractConditionalOperator(), and clang::interp::Compiler< Emitter >::visitIfStmt().
|
static |
Definition at line 2220 of file Interp.cpp.
References clang::AK_MemberCall, clang::C, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::Type::getAsCXXRecordDecl(), clang::interp::State::getASTContext(), clang::interp::PtrView::getBase(), clang::ASTContext::getLValueReferenceType(), clang::interp::InterpFrame::getSource(), clang::interp::PtrView::getType(), clang::interp::InterpState::InitializingPtrs, clang::interp::PtrView::isConst(), clang::VarDecl::isConstexpr(), clang::interp::Block::isGlobal(), clang::interp::PtrView::Pointee, Pointer, clang::interp::PtrView::stripBaseCasts(), and V.
Referenced by CallVirt().
Definition at line 181 of file InterpBuiltin.cpp.
References clang::interp::Pointer::asStringPointer(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::StringPointer::getLiteral(), getPointeeType(), clang::Expr::getType(), clang::interp::Descriptor::getType(), clang::interp::Pointer::getType(), clang::interp::Descriptor::isArray(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Pointer::isOpaquePointer(), clang::interp::Descriptor::isPrimitive(), clang::interp::Pointer::isStringPointer(), and clang::T.
Referenced by interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_pack(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_test_op(), interp__builtin_load8(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), and interp__builtin_strcmp().
| 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 1651 of file Interp.h.
References clang::interp::PtrView::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::PtrView::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and clang::interp::Pointer::view().
|
static |
Definition at line 1695 of file Interp.cpp.
References allowNullSubObj(), CheckArray(), CheckNull(), CheckRange(), CheckSubobject(), clang::CSK_Field, clang::interp::InterpState::Ctx, diagnoseTypeIdField(), clang::interp::InterpState::extendPointerPath(), clang::interp::PointerPathEntry::field(), clang::Type::getAsRecordDecl(), clang::interp::InterpState::getContext(), clang::interp::OpaquePointer::getFieldType(), clang::interp::State::getLangOpts(), clang::interp::Context::getRecord(), clang::interp::InterpState::inConstantContext(), clang::Off, clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::OpaquePointer::withPath().
Referenced by GetPtrField(), and GetPtrFieldPop().
| 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 1677 of file Interp.h.
References clang::interp::PtrView::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::PtrView::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and clang::interp::Pointer::view().
|
inline |
Definition at line 3616 of file Interp.h.
References clang::Func, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetGlobal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1719 of file Interp.h.
References CheckGlobalLoad(), clang::interp::Block::deref(), clang::interp::Program::getGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::GetGlobalUnchecked | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Same as GetGlobal, but without the checks.
Definition at line 1731 of file Interp.h.
References clang::interp::Block::deref(), diagnoseUninitialized(), clang::interp::Block::getBlockDesc(), clang::interp::Program::getGlobal(), Initialized, clang::interp::Block::isExtern(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3623 of file Interp.h.
References Address, BlockAddress, clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, FunctionAddress, clang::interp::State::getASTContext(), clang::interp::Program::getFunction(), clang::interp::Program::getGlobal(), clang::interp::State::getLangOpts(), clang::interp::Program::getOrCreateGlobal(), clang::interp::InterpFrame::getSource(), clang::ASTContext::getTargetNullPointerValue(), clang::Invalid, isIntegralOrPointer(), clang::interp::InterpState::P, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::GetLocal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1609 of file Interp.h.
References CheckLocalLoad(), clang::interp::InterpState::Current, clang::interp::Block::deref(), clang::interp::InterpFrame::getLocalBlock(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 2829 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::isLocalEnabled(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtr | ( | InterpState & | S, |
| const ValueDecl * | D ) |
Definition at line 3465 of file Interp.cpp.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtrBase | ( | InterpState & | S | ) |
Definition at line 3470 of file Interp.cpp.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtrDecl | ( | InterpState & | S | ) |
Definition at line 3480 of file Interp.cpp.
References clang::Func, clang::interp::InterpState::getContext(), clang::interp::Context::getOrCreateFunction(), clang::Method, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2684 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetParam | ( | InterpState & | S, |
| uint32_t | Index ) |
Definition at line 1634 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getParam(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::GetPtrBase | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off ) |
Definition at line 1821 of file Interp.cpp.
References getBase(), clang::Off, clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetPtrBasePop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off, | ||
| bool | NullOK ) |
Definition at line 1825 of file Interp.cpp.
References getBase(), clang::Off, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by CallVirt().
| bool clang::interp::GetPtrDerivedPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | NullOK, | ||
| const Type * | TargetType, | ||
| const Type * | FinalType ) |
Definition at line 1831 of file Interp.cpp.
References clang::interp::State::CCEDiag(), CheckNull(), CheckSubobject(), clang::CSK_Derived, clang::interp::InterpState::Current, clang::interp::InterpFrame::getSource(), clang::interp::PtrView::getType(), clang::ASTContext::hasSameType(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::GetPtrField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off ) |
1) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack
Definition at line 1759 of file Interp.cpp.
References getField(), clang::Off, clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetPtrFieldPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off ) |
Definition at line 1764 of file Interp.cpp.
References getField(), clang::Off, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2071 of file Interp.h.
References clang::interp::Program::getPtrGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2025 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocalPointer(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2064 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::getParamPointer(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2099 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), clang::Off, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
|
inline |
Definition at line 2087 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), clang::Off, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
|
inline |
Definition at line 2173 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), This(), and virtBaseHelper().
|
inline |
Definition at line 2164 of file Interp.h.
References CheckNull(), clang::CSK_Base, clang::interp::InterpStack::peek(), clang::interp::InterpState::Stk, and virtBaseHelper().
|
inline |
Definition at line 2155 of file Interp.h.
References CheckNull(), clang::CSK_Base, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and virtBaseHelper().
|
inline |
Definition at line 2035 of file Interp.h.
References clang::interp::Descriptor::asVarDecl(), clang::interp::Block::deref(), diagnoseUninitialized(), clang::interp::InterpState::EvaluatingDecl, clang::interp::Block::getBlockDesc(), clang::interp::Block::getDescriptor(), clang::interp::Program::getGlobal(), Initialized, clang::interp::Block::isConstexprUnknown(), clang::interp::Block::isExtern(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2030 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocalBlock(), and handleReference().
|
inlinestatic |
Definition at line 138 of file InterpHelpers.h.
References clang::FPOptions::getRoundingMode().
Referenced by Addf(), CastIntegralFloating(), Divf(), IncDecFloatHelper(), interp__builtin_elementwise_triop_fp(), interp__builtin_ia32_addsub(), interp_builtin_horizontal_fp_binop(), Mulf(), Subf(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 3660 of file Interp.h.
References clang::interp::InterpState::newStringID(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 62 of file DeclOrExpr.h.
|
inline |
Definition at line 188 of file FixedPoint.h.
Definition at line 19 of file Floating.cpp.
| IntegralAP< Signed > clang::interp::getSwappedBytes | ( | IntegralAP< Signed > | F | ) |
Definition at line 378 of file IntegralAP.h.
| bool clang::interp::GetThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1701 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckLoad(), CheckThis(), clang::interp::InterpState::Current, clang::interp::PtrView::deref(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and This().
| bool clang::interp::GetTypeid | ( | InterpState & | S, |
| const Type * | TypePtr, | ||
| const Type * | TypeInfoType ) |
Typeid support.
Definition at line 3089 of file Interp.cpp.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetTypeidPtr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | TypeInfoType ) |
Definition at line 3094 of file Interp.cpp.
References clang::AK_TypeId, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::Func, clang::interp::Context::getASTContext(), clang::interp::State::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::interp::InterpState::getContext(), clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getFunction(), clang::ASTContext::getLValueReferenceType(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and V.
| bool clang::interp::GT | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1520 of file Interp.h.
References CmpHelper(), and clang::Greater.
| bool clang::interp::handleFixedPointOverflow | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const FixedPoint & | FP ) |
Definition at line 2975 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::State::getASTContext(), clang::ASTContext::getDiagnostics(), clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::interp::State::noteUndefinedBehavior(), clang::DiagnosticsEngine::Report(), and clang::interp::FixedPoint::toDiagnosticString().
Referenced by AddSubMulHelper(), CastFixedPoint(), CastFloatingFixedPoint(), CastIntegralFixedPoint(), Div(), and ShiftFixedPoint().
| bool clang::interp::handleOverflow | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const T & | SrcValue ) |
Definition at line 113 of file InterpHelpers.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getType(), clang::interp::State::noteUndefinedBehavior(), and clang::T.
Referenced by AddSubMulHelper(), CastFixedPointIntegral(), floatAPCast(), IncDecHelper(), interp__builtin_vector_reduce(), Neg(), and SubPtr().
| bool clang::interp::handleReference | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| Block * | B ) |
Definition at line 3070 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::Block::deref(), clang::interp::State::FFDiag(), clang::interp::Block::getBlockDesc(), clang::interp::Block::getDescriptor(), clang::interp::Descriptor::getPrimType(), clang::interp::InterpFrame::getSource(), clang::interp::Block::isConstexprUnknown(), PT_Ptr, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by GetRefLocal().
| bool clang::interp::Inc | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
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 960 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::visitCXXForRangeStmt(), and clang::interp::Compiler< Emitter >::visitForStmt().
| bool clang::interp::IncBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| unsigned | BitWidth ) |
Definition at line 972 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::IncDecFloatHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| uint32_t | FPOI ) |
Definition at line 1113 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::interp::Floating::decrement(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), Inc, clang::interp::Floating::increment(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and Yes.
| bool clang::interp::IncDecHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| bool | CanOverflow, | ||
| UnsignedOrNone | BitWidth = std::nullopt ) |
Definition at line 883 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::interp::State::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), handleOverflow(), Inc, clang::Invalid, isIntegralOrPointer(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, clang::interp::InterpState::Stk, clang::T, and Yes.
Referenced by Dec(), DecBitfield(), DecPop(), DecPopBitfield(), Inc(), IncBitfield(), IncPop(), IncPopBitfield(), PreDec(), PreDecBitfield(), PreInc(), and PreIncBitfield().
|
inlinestatic |
Definition at line 2691 of file Interp.h.
References addSubOffsetOpaque(), CheckNull(), clang::CSK_ArrayIndex, clang::interp::Pointer::isOpaquePointer(), OffsetHelper(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1133 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1143 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::IncPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
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 988 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::IncPopBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| uint32_t | BitWidth ) |
Definition at line 999 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2724 of file Interp.h.
References clang::AK_Increment, diagnoseUninitialized(), IncDecPtrHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Init | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2381 of file Interp.h.
References CheckInit(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Compiler< Emitter >::allocateLocal(), clang::interp::Program::createDescriptor(), clang::interp::Program::createGlobal(), clang::interp::Program::DeclScope, clang::interp::Context::evaluateAsInitializer(), clang::interp::Program::getOrCreateGlobal(), initNeedsOverridenLoc(), clang::interp::EvalEmitter::interpretDecl(), clang::interp::Compiler< Emitter >::visitArrayElemInit(), clang::interp::Compiler< Emitter >::VisitCompoundLiteralExpr(), clang::interp::Compiler< Emitter >::visitCXXForRangeStmt(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), clang::interp::ByteCodeEmitter::visitDeclAndReturn(), clang::interp::Compiler< Emitter >::visitDeclAndReturn(), clang::interp::EvalEmitter::visitDeclAndReturn(), clang::interp::Compiler< Emitter >::visitDeclRef(), clang::interp::Compiler< Emitter >::visitForStmt(), clang::interp::Compiler< Emitter >::visitInitList(), clang::interp::Compiler< Emitter >::VisitLambdaExpr(), clang::interp::Compiler< Emitter >::visitVarDecl(), and clang::interp::Context::~Context().
|
static |
Definition at line 2768 of file Interp.cpp.
References clang::interp::PtrView::getRecord(), initBasesRecurse(), clang::interp::PtrView::initialize(), and clang::interp::PtrView::startLifetime().
Referenced by DefaultInit(), and initBasesRecurse().
| bool clang::interp::InitBitField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1947 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckArray(), CheckRange(), clang::CSK_Field, isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::InitBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1984 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckArray(), CheckRange(), clang::CSK_Field, isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::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 2406 of file Interp.h.
References clang::AK_Assign, CheckLive(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::Descriptor::getNumElems(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::isArray(), clang::interp::Descriptor::isUnknownSizeArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::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 2443 of file Interp.h.
References clang::AK_Assign, CheckLive(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::Descriptor::getNumElems(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::isArray(), clang::interp::Descriptor::isUnknownSizeArray(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::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 1911 of file Interp.h.
References CheckArray(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::InitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1929 of file Interp.h.
References CheckArray(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::InitGlobal | ( | InterpState & | S, |
| uint32_t | I ) |
Definition at line 1748 of file Interp.h.
References clang::interp::Pointer::deref(), clang::interp::OpaquePointer::getFieldType(), clang::interp::Program::getGlobal(), clang::interp::MemberPointer::getPathLength(), clang::QualType::getTypePtr(), clang::interp::Pointer::initialize(), clang::interp::OpaquePointer::isOnePastEnd(), needsAlloc(), clang::interp::InterpState::P, clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, Pointer, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, clang::T, and clang::interp::OpaquePointer::withPath().
| bool clang::interp::InitGlobalTemp | ( | InterpState & | S, |
| 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 1796 of file Interp.h.
References clang::ConstantFold, clang::interp::State::EvalMode, clang::interp::Program::getGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::pop(), clang::interp::InterpState::SeenGlobalTemporaries, clang::interp::InterpState::Stk, and clang::T.
|
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 1814 of file Interp.h.
References clang::ConstantFold, clang::interp::State::EvalMode, clang::interp::InterpStack::peek(), clang::interp::InterpState::SeenGlobalTemporaries, and clang::interp::InterpState::Stk.
| bool clang::interp::InitPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2392 of file Interp.h.
References CheckInit(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::InitThisBitField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1859 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, clang::T, and This().
| bool clang::interp::InitThisBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1883 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, clang::T, and This().
| bool clang::interp::InitThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1826 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, clang::T, and This().
| bool clang::interp::InitThisFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1842 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, clang::T, and This().
|
static |
Definition at line 813 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 898 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::InterpState::getContext(), PT_Ptr, and clang::interp::OptPrimType::value_or().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1810 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 309 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
__builtin_assume_aligned(Ptr, Alignment[, ExtraOffset])
Definition at line 1476 of file InterpBuiltin.cpp.
References clang::CharUnits::alignTo(), Call(), clang::interp::State::CCEDiag(), clang::interp::Context::classify(), clang::interp::InterpState::Ctx, clang::CharUnits::fromQuantity(), clang::interp::State::getASTContext(), getBaseAlignment(), clang::CharUnits::getQuantity(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*)
Definition at line 1189 of file InterpBuiltin.cpp.
References Call(), clang::CharUnits::fromQuantity(), clang::Type::getAs(), clang::interp::State::getASTContext(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::Type::getPointeeType(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::Invalid, clang::Type::isIncompleteType(), clang::CharUnits::One(), clang::interp::InterpStack::pop(), popToUInt64(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::ASTContext::toCharUnitsFromBits().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1174 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
bool __c11_atomic_is_lock_free(size_t)
Definition at line 1263 of file InterpBuiltin.cpp.
References Call(), clang::CharUnits::fromQuantity(), clang::interp::State::getASTContext(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::ASTContext::getTargetInfo(), popToUInt64(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::ASTContext::toCharUnitsFromBits().
Referenced by InterpretBuiltin().
|
static |
Three integral values followed by a pointer (lhs, rhs, carry, carryOut).
Definition at line 1038 of file InterpBuiltin.cpp.
References assignIntegral(), Call(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::hasSimilarType(), clang::interp::Pointer::initialize(), isReadable(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 864 of file InterpBuiltin.cpp.
References Call(), EvaluateBuiltinClassifyType(), clang::interp::State::getLangOpts(), clang::Expr::getType(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1101 of file InterpBuiltin.cpp.
References Call(), convertBoolVectorToInt(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
__builtin_complex(Float A, float B);
Definition at line 1286 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 581 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), clang::Copy, clang::interp::Floating::getAPFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1142 of file InterpBuiltin.cpp.
References Call(), convertBoolVectorToInt(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 916 of file InterpBuiltin.cpp.
References Call(), clang::interp::State::getASTContext(), clang::TargetInfo::getEHDataRegisterNumber(), clang::ASTContext::getTargetInfo(), popToAPSInt(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1877 of file InterpBuiltin.cpp.
References abs(), Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::interp::Descriptor::isPrimitiveArray(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpStack::push(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by InterpretBuiltin().
|
static |
Can be called with an integer or vector as the first and only parameter.
Definition at line 1929 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atIndex(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Pointer::getNumElems(), clang::interp::InterpFrame::getSource(), clang::ASTContext::hasSameUnqualifiedType(), clang::interp::Pointer::initialize(), INT_TYPE_SWITCH_NO_BOOL, clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::interp::InterpState::Stk, and clang::T.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2700 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), Fn, clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::interp::Pointer::initializeAllElements(), interp__builtin_elementwise_fp_binop(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_elementwise_fp_binop(), and InterpretBuiltin().
|
static |
Definition at line 2790 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_elementwise_int_binop(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_elementwise_int_binop(), and InterpretBuiltin().
|
static |
Definition at line 2659 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_elementwise_int_unaryop(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_elementwise_int_unaryop(), and InterpretBuiltin().
|
static |
Definition at line 2905 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_elementwise_maxmin(), clang::Type::isIntegerType(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_elementwise_maxmin(), and InterpretBuiltin().
|
static |
Definition at line 3534 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::InterpState::getContext(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_elementwise_triop(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_elementwise_triop(), and InterpretBuiltin().
|
static |
Definition at line 3344 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), Call(), clang::Type::castAs(), clang::interp::InterpState::Ctx, clang::interp::Pointer::elem(), Fn, clang::interp::Floating::getAPFloat(), clang::VectorType::getElementType(), clang::interp::Context::getLangOpts(), clang::VectorType::getNumElements(), getRoundingMode(), clang::interp::Pointer::initializeAllElements(), interp__builtin_elementwise_triop_fp(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, clang::T, and X.
Referenced by interp__builtin_elementwise_triop_fp(), and InterpretBuiltin().
|
static |
Definition at line 880 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), discard(), clang::interp::InterpStack::discard(), clang::interp::InterpState::getContext(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 806 of file InterpBuiltin.cpp.
References abs(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 609 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), clang::interp::Floating::getAPFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 595 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), clang::interp::Floating::getAPFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Five int values followed by one floating value.
__builtin_fpclassify(int, int, int, int, int, float)
Definition at line 755 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Floating::getCategory(), clang::interp::InterpState::getContext(), clang::interp::Floating::isDenormal(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
(CarryIn, LHS, RHS, Result)
Definition at line 1532 of file InterpBuiltin.cpp.
References assignIntegral(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3254 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpState::Ctx, clang::interp::Pointer::elem(), clang::interp::Context::getLangOpts(), clang::VectorType::getNumElements(), getRoundingMode(), interp__builtin_ia32_addsub(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_addsub(), and InterpretBuiltin().
|
static |
Definition at line 4670 of file InterpBuiltin.cpp.
References clang::C, Call(), clang::interp::Descriptor::getPrimType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_bmac(), clang::interp::Descriptor::isPrimitiveArray(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), PT_Sint16, PT_Uint16, clang::interp::InterpState::Stk, clang::T, and uint16_t.
Referenced by interp__builtin_ia32_bmac(), and InterpretBuiltin().
|
static |
Definition at line 3903 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), evalICmpImm(), clang::interp::Pointer::getNumElems(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_cmp_mask(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_cmp_mask(), and InterpretBuiltin().
|
static |
Definition at line 843 of file InterpBuiltin.cpp.
References Call(), popToUInt64(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3986 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_cvt_mask2vec(), clang::interp::InterpStack::peek(), popToAPSInt(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_cvt_mask2vec(), and InterpretBuiltin().
|
static |
Definition at line 3964 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getIntWidth(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_cvt_vec2mask(), clang::interp::InterpStack::pop(), pushInteger(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_cvt_vec2mask(), and InterpretBuiltin().
|
static |
Definition at line 4064 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), Call(), CheckLoad(), convertDoubleToFloatStrict(), clang::interp::Pointer::elem(), clang::ASTContext::FloatTy, clang::interp::State::getASTContext(), clang::ASTContext::getFloatTypeSemantics(), clang::VectorType::getNumElements(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_cvtpd2ps(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_cvtpd2ps(), and InterpretBuiltin().
|
static |
Definition at line 4011 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), Call(), CheckLoad(), convertDoubleToFloatStrict(), clang::interp::Pointer::elem(), clang::ASTContext::FloatTy, clang::interp::State::getASTContext(), clang::ASTContext::getFloatTypeSemantics(), clang::VectorType::getNumElements(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_cvtsd2ss(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_cvtsd2ss(), and InterpretBuiltin().
|
static |
Definition at line 3058 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_dbpsadbw(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToUInt64(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_dbpsadbw(), and InterpretBuiltin().
|
static |
Definition at line 3605 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_extract_vector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_extract_vector(), and InterpretBuiltin().
|
static |
Definition at line 3642 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_extract_vector_masked(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_extract_vector_masked(), and InterpretBuiltin().
|
static |
Definition at line 4504 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getNumElements(), GFNIAffine(), INT_TYPE_SWITCH, interp__builtin_ia32_gfni_affine(), clang::Type::isIntegerType(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, clang::T, and X.
Referenced by interp__builtin_ia32_gfni_affine(), and InterpretBuiltin().
|
static |
Definition at line 4565 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getNumElements(), clang::interp::Pointer::getNumElems(), GFNIMul(), INT_TYPE_SWITCH, interp__builtin_ia32_gfni_mul(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_gfni_mul(), and InterpretBuiltin().
|
static |
Definition at line 3687 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_insert_subvector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_insert_subvector(), and InterpretBuiltin().
|
static |
Definition at line 3505 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_movmsk_op(), clang::Type::isIntegerType(), clang::Type::isRealFloatingType(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_movmsk_op(), and InterpretBuiltin().
|
static |
Definition at line 3128 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_mpsadbw(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToUInt64(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_mpsadbw(), and InterpretBuiltin().
|
static |
Definition at line 4450 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getNumElements(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH, interp__builtin_ia32_multishiftqb(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_multishiftqb(), and InterpretBuiltin().
|
static |
Definition at line 2860 of file InterpBuiltin.cpp.
References assignIntegral(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::CallExpr::getArg(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), getElemType(), clang::ASTContext::getIntWidth(), clang::VectorType::getNumElements(), clang::Expr::getType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_pack(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_pack(), and InterpretBuiltin().
|
static |
Definition at line 3283 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_pclmulqdq(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_pclmulqdq(), and InterpretBuiltin().
|
static |
Definition at line 3730 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_phminposuw(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_phminposuw(), and InterpretBuiltin().
|
static |
Definition at line 2981 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_pmul(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_pmul(), and InterpretBuiltin().
|
static |
Definition at line 3019 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_psadbw(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_psadbw(), and InterpretBuiltin().
|
static |
Definition at line 3769 of file InterpBuiltin.cpp.
References clang::C, Call(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_pternlog(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_pternlog(), and InterpretBuiltin().
|
static |
AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]".
Definition at line 3406 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH, INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_select(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_select(), and InterpretBuiltin().
|
static |
Scalar variant of AVX512 predicated select: Result[i] = (Mask bit 0) ?
LHS[i] : RHS[i], but only element 0 may change. All other elements are taken from RHS.
Definition at line 3443 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_select_scalar(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_select_scalar(), and InterpretBuiltin().
|
static |
Definition at line 4233 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), clang::ASTContext::getTypeSize(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH, interp__builtin_ia32_shift_with_count(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_shift_with_count(), and InterpretBuiltin().
|
static |
Definition at line 4296 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), INT_TYPE_SWITCH, interp__builtin_ia32_shufbitqmb_mask(), clang::Type::isIntegerType(), clang::Type::isVectorType(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_shufbitqmb_mask(), and InterpretBuiltin().
|
static |
Definition at line 4132 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getFloatTypeSemantics(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH, INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_shuffle_generic(), clang::Type::isIntegerType(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, PT_Uint32, clang::interp::InterpState::Stk, clang::T, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_shuffle_generic(), and InterpretBuiltin().
|
static |
Definition at line 4221 of file InterpBuiltin.cpp.
References Call(), and interp__builtin_ia32_shuffle_generic().
|
static |
Definition at line 3466 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_test_op(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::interp::InterpStack::pop(), pushInteger(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_test_op(), and InterpretBuiltin().
|
static |
Definition at line 4360 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::Pointer::elem(), clang::interp::State::FFDiag(), clang::interp::Floating::getAPFloat(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getFloatTypeSemantics(), clang::ASTContext::getLangOpts(), clang::VectorType::getNumElements(), clang::interp::InterpFrame::getSource(), clang::ASTContext::HalfTy, INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vcvtps2ph(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_vcvtps2ph(), and InterpretBuiltin().
|
static |
Definition at line 3818 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vec_ext(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, clang::interp::InterpStack::push(), pushInteger(), clang::interp::InterpState::Stk, clang::T, and V.
Referenced by interp__builtin_ia32_vec_ext(), and InterpretBuiltin().
|
static |
Definition at line 3847 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vec_set(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_vec_set(), and InterpretBuiltin().
|
static |
Definition at line 3937 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vpconflict(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_vpconflict(), and InterpretBuiltin().
|
static |
Definition at line 4600 of file InterpBuiltin.cpp.
References Call(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), clang::VectorType::getNumElements(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vpdp(), clang::Type::isVectorType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_ia32_vpdp(), and InterpretBuiltin().
|
static |
Definition at line 568 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), Call(), clang::interp::State::getASTContext(), clang::ASTContext::getFloatTypeSemantics(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1597 of file InterpBuiltin.cpp.
References clang::LangOptions::AllocTokenMax, clang::LangOptions::AllocTokenMode, Call(), clang::interp::State::CCEDiag(), clang::interp::Context::classify(), discard(), clang::infer_alloc::getAllocTokenMetadata(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getLangOpts(), clang::ASTContext::getSizeType(), clang::ASTContext::getTypeSize(), clang::infer_alloc::inferPossibleType(), clang::QualType::isNull(), PT_Ptr, pushInteger(), clang::interp::InterpState::Stk, and clang::interp::OptPrimType::value_or().
Referenced by InterpretBuiltin().
|
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 1305 of file InterpBuiltin.cpp.
References clang::CharUnits::alignmentAtOffset(), arrayElemPtrOpaque(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::Ctx, clang::interp::State::FFDiag(), clang::CharUnits::fromQuantity(), clang::interp::State::getASTContext(), clang::ASTContext::getDeclAlign(), clang::ASTContext::getIntWidth(), clang::CharUnits::getQuantity(), isIntegerType(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Bool, PT_Ptr, clang::interp::InterpStack::push(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 277 of file InterpBuiltin.cpp.
References Call(), clang::interp::State::checkingPotentialConstantExpression(), clang::Expr::EvalStatus::Diag, clang::interp::InterpState::FrameDepth, clang::interp::Boolean::from(), clang::interp::Frame::getCallee(), clang::interp::State::getEvalStatus(), clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::interp::InterpFrame::getRetPC(), clang::Stmt::getSourceRange(), clang::interp::InterpState::inConstantContext(), clang::interp::InterpStack::push(), clang::interp::State::report(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2604 of file InterpBuiltin.cpp.
References clang::AK_Read, Call(), clang::interp::InterpFrame::Caller, clang::interp::State::CCEDiag(), CheckDummy(), CheckLive(), CheckMutable(), clang::interp::InterpState::Current, Diag(), diagnoseUnreadableObject(), Ended, clang::Error, Error(), clang::interp::InterpState::EvaluatingDecl, clang::interp::InterpFrame::getCallee(), clang::interp::InterpFrame::getRetPC(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::inConstantContext(), clang::interp::InterpState::initializingBlock(), interp__builtin_is_within_lifetime(), clang::IdentifierInfo::isStr(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_is_within_lifetime(), and InterpretBuiltin().
|
static |
Definition at line 658 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isFinite(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.
Definition at line 738 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::classify(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 644 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::getAPFloat(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
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 626 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isNan(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 667 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isNormal(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 635 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isSignaling(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 676 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isDenormal(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 685 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isZero(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2243 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::CharUnits::alignmentAtOffset(), clang::ASTContext::BuiltinInfo, Call(), CheckLoad(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::CharUnits::fromQuantity(), clang::interp::State::getASTContext(), getBaseAlignment(), clang::interp::InterpState::getContext(), getElemType(), clang::CharUnits::getQuantity(), clang::Builtin::Context::getQuotedName(), clang::interp::InterpFrame::getSource(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH, isIntegerOrBoolType(), isReadable(), clang::interp::Pointer::load(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, clang::T, and uint64_t.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2453 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::ASTContext::BuiltinInfo, Call(), CheckLoad(), clang::interp::Context::classify(), clang::interp::InterpState::Current, diagnoseNonConstexprBuiltin(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ASTContext::getCharWidth(), clang::interp::InterpState::getContext(), getElemType(), clang::Builtin::Context::getQuotedName(), clang::interp::InterpFrame::getSource(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_memchr(), isOneByteCharacterType(), isReadable(), clang::interp::Pointer::load(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Sint8, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and V.
Referenced by interp__builtin_memchr(), and InterpretBuiltin().
|
static |
Definition at line 2331 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::ASTContext::BuiltinInfo, clang::interp::BitcastBuffer::byteSize(), Call(), CheckLoad(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::BitcastBuffer::Data, clang::interp::BitcastBuffer::deref(), diagnoseNonConstexprBuiltin(), clang::interp::State::FFDiag(), FIXED_SIZE_INT_TYPE_SWITCH, clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::CharUnits::getQuantity(), clang::interp::Bytes::getQuantity(), clang::Builtin::Context::getQuotedName(), clang::interp::InterpFrame::getSource(), clang::ASTContext::getTargetInfo(), clang::interp::Pointer::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWCharType(), clang::if(), clang::TargetInfo::isBigEndian(), clang::interp::Pointer::isFunctionPointer(), isOneByteCharacterType(), clang::interp::Pointer::isReadablePointerType(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), readPointerToBuffer(), clang::interp::InterpState::Stk, and swapBytes().
Referenced by InterpretBuiltin().
|
static |
Definition at line 2019 of file InterpBuiltin.cpp.
References clang::AK_Assign, Call(), clang::interp::InterpState::Current, diagnoseNonConstexprBuiltin(), diagnoseUnreadableObject(), DoMemcpy(), clang::interp::Pointer::expand(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), getElemType(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getIntegerRepresentation(), clang::interp::Pointer::getNumElems(), clang::CharUnits::getQuantity(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWCharType(), clang::ASTContext::hasSameUnqualifiedType(), clang::interp::Pointer::inArray(), clang::interp::Pointer::isBlockPointer(), clang::Type::isIncompleteType(), clang::interp::Pointer::isIntegralPointer(), isReadable(), clang::QualType::isTriviallyCopyableType(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::Pointer::isZero(), clang::interp::Pointer::pointToSameBlock(), clang::interp::InterpStack::pop(), popToUInt64(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::interp::Pointer::stripBaseCasts(), clang::interp::Pointer::toDiagnosticString(), and toString().
Referenced by InterpretBuiltin().
|
static |
Definition at line 4801 of file InterpBuiltin.cpp.
References clang::interp::Boolean::from(), interp__builtin_meta_is_type(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::Type.
Referenced by interp__builtin_meta_is_type(), and InterpretBuiltin().
|
static |
Definition at line 910 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
Definition at line 488 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::InterpState::allocFloat(), clang::interp::Pointer::asStringPointer(), clang::interp::Pointer::atIndex(), Call(), CheckLoad(), CheckRange(), clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getFloatTypeSemantics(), clang::interp::StringPointer::getLiteral(), clang::interp::Pointer::getNumElems(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isElementInitialized(), clang::TargetInfo::isNan2008(), clang::StringLiteral::isOrdinary(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Pointer::isStringPointer(), clang::interp::Pointer::loadElem(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2555 of file InterpBuiltin.cpp.
References Call(), clang::ConstantExpression, clang::ConstantExpressionUnevaluated, clang::ConstantFold, clang::interp::State::EvalMode, evaluateBuiltinObjectSize(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::IgnoreSideEffects, interp__builtin_object_size(), clang::Invalid, clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_object_size(), and InterpretBuiltin().
|
static |
Definition at line 1747 of file InterpBuiltin.cpp.
References Call(), clang::interp::State::CCEDiag(), clang::interp::State::checkingPotentialConstantExpression(), CheckNewDeleteForms(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::DynamicAllocator::deallocate(), discard(), clang::interp::InterpStack::discard(), clang::interp::State::FFDiag(), clang::interp::DynamicAllocator::getAllocationForm(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Block::getDescriptor(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::getStdAllocatorCaller(), clang::interp::Block::isDynamic(), clang::interp::State::Note(), clang::interp::DynamicAllocator::Operator, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1637 of file InterpBuiltin.cpp.
References clang::interp::DynamicAllocator::allocate(), Call(), CheckArraySize(), clang::interp::Context::classify(), clang::interp::Program::createDescriptor(), clang::interp::InterpState::Ctx, clang::interp::InterpState::Current, discard(), clang::interp::State::FFDiag(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::interp::InterpState::getContext(), clang::interp::Context::getEvalID(), clang::interp::State::getLangOpts(), clang::ConstantArrayType::getMaxSizeBits(), clang::CharUnits::getQuantity(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::getStdAllocatorCaller(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), clang::CharUnits::isZero(), clang::interp::Descriptor::MaxArrayElemBytes, clang::Normal, clang::interp::DynamicAllocator::Operator, clang::interp::InterpState::P, Pointer, popToAPSInt(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1573 of file InterpBuiltin.cpp.
References Call(), clang::analyze_os_log::computeOSLogBufferLayout(), clang::interp::State::getASTContext(), clang::CharUnits::getQuantity(), pushInteger(), and clang::analyze_os_log::OSLogBufferLayout::size().
Referenced by InterpretBuiltin().
|
static |
Definition at line 930 of file InterpBuiltin.cpp.
References assignIntegral(), Call(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getIntWidth(), clang::interp::Pointer::initialize(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::Type::isSignedIntegerOrEnumerationType(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 828 of file InterpBuiltin.cpp.
References Call(), convertBoolVectorToInt(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1584 of file InterpBuiltin.cpp.
References Call(), clang::cast(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2749 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), Fn, clang::VectorType::getNumElements(), interp__builtin_scalar_fp_round_mask_binop(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), popToUInt64(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by interp__builtin_scalar_fp_round_mask_binop(), and InterpretBuiltin().
|
static |
Definition at line 694 of file InterpBuiltin.cpp.
References Call(), clang::interp::Floating::isNegative(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2182 of file InterpBuiltin.cpp.
References clang::AK_Assign, clang::AK_Read, Call(), CheckLoad(), CheckStore(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::State::FFDiag(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::getType(), clang::Half, clang::interp::Pointer::initialize(), INT_TYPE_SWITCH_NO_BOOL, clang::interp::Descriptor::isArray(), isReadable(), clang::interp::InterpStack::pop(), popToUInt64(), clang::interp::InterpState::Stk, and clang::T.
Referenced by InterpretBuiltin().
|
static |
Definition at line 317 of file InterpBuiltin.cpp.
References clang::AK_Read, Call(), clang::interp::Context::canClassify(), CheckLive(), clang::interp::Context::classify(), clang::interp::InterpState::Current, diagnoseNonConstexprBuiltin(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::ASTContext::hasSameUnqualifiedType(), INT_TYPE_SWITCH, clang::interp::Pointer::isDummy(), clang::interp::Pointer::isReadablePointerType(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::Pointer::loadElem(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), clang::interp::InterpState::Stk, clang::T, and V.
Referenced by InterpretBuiltin().
|
static |
Definition at line 410 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::asStringPointer(), clang::interp::PtrView::atIndex(), Call(), CheckArray(), CheckDummy(), CheckLive(), CheckRange(), clang::interp::PtrView::deref(), diagnoseNonConstexprBuiltin(), FIXED_SIZE_INT_TYPE_SWITCH, clang::interp::State::getASTContext(), clang::interp::Pointer::getByteOffset(), clang::interp::Descriptor::getElemDataSize(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::StringPointer::getLiteral(), clang::interp::Descriptor::getPrimType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWCharType(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isConstexprUnknown(), isFixedSizeIntegralType(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Pointer::isStringPointer(), clang::Off, clang::interp::InterpStack::pop(), pushInteger(), clang::interp::InterpState::Stk, clang::T, and clang::interp::Pointer::view().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1818 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), handleOverflow(), INT_TYPE_SWITCH_NO_BOOL, isIntegerType(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3218 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpState::Ctx, clang::interp::Pointer::elem(), Fn, clang::interp::State::getASTContext(), clang::interp::Context::getLangOpts(), clang::VectorType::getNumElements(), getRoundingMode(), clang::ASTContext::getTypeSize(), interp_builtin_horizontal_fp_binop(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp_builtin_horizontal_fp_binop(), and InterpretBuiltin().
|
static |
Definition at line 3178 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), Fn, clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getIntWidth(), INT_TYPE_SWITCH_NO_BOOL, interp_builtin_horizontal_int_binop(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp_builtin_horizontal_int_binop(), and InterpretBuiltin().
|
static |
Definition at line 4740 of file InterpBuiltin.cpp.
References clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::ASTContext::getIntWidth(), clang::Expr::getType(), interp_builtin_ia32_cvt_scalar_to_int(), clang::Type::isUnsignedIntegerType(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by interp_builtin_ia32_cvt_scalar_to_int(), and InterpretBuiltin().
|
static |
Definition at line 4761 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::Floating::getAPFloat(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getIntWidth(), clang::interp::Pointer::getNumElems(), INT_TYPE_SWITCH_NO_BOOL, interp_builtin_ia32_cvt_vector_to_int(), clang::Type::isUnsignedIntegerType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by interp_builtin_ia32_cvt_vector_to_int(), and InterpretBuiltin().
|
static |
Definition at line 703 of file InterpBuiltin.cpp.
References Call(), Cmp, clang::interp::Floating::compare(), clang::Greater, clang::Less, clang::interp::InterpStack::pop(), pushInteger(), clang::interp::InterpState::Stk, and clang::Unordered.
Referenced by InterpretBuiltin().
| bool clang::interp::Interpret | ( | InterpState & | S | ) |
Interpreter entry point.
Definition at line 3818 of file Interp.cpp.
References clang::interp::InterpState::Current, Fn, clang::interp::Function::getCodeBegin(), clang::interp::InterpFrame::getFunction(), InterpFunctions, OpReturns(), clang::interp::InterpState::PC, and clang::interp::CodePtr::read().
| bool clang::interp::InterpretBuiltin | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const CallExpr * | Call, | ||
| uint32_t | BuiltinID ) |
Interpret a builtin function.
Definition at line 4808 of file InterpBuiltin.cpp.
References clang::C, Call(), clang::Type::castAs(), clang::interp::InterpState::Current, EvalScalarMinMaxFp(), clang::interp::State::getASTContext(), clang::ASTContext::getIntWidth(), clang::VectorType::getNumElements(), clang::ASTContext::getTypeSize(), interp__builtin_abs(), interp__builtin_addressof(), interp__builtin_arithmetic_fence(), interp__builtin_assume(), interp__builtin_assume_aligned(), interp__builtin_atomic_lock_free(), interp__builtin_bswap(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_copysign(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_fp_binop(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_int_unaryop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_triop(), interp__builtin_elementwise_triop_fp(), interp__builtin_expect(), interp__builtin_fabs(), interp__builtin_fmax(), interp__builtin_fmin(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_addsub(), interp__builtin_ia32_bmac(), interp__builtin_ia32_cmp_mask(), interp__builtin_ia32_crc32(), interp__builtin_ia32_cvt_mask2vec(), interp__builtin_ia32_cvt_vec2mask(), interp__builtin_ia32_cvtpd2ps(), interp__builtin_ia32_cvtsd2ss(), interp__builtin_ia32_dbpsadbw(), interp__builtin_ia32_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_gfni_mul(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_mpsadbw(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pack(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_psadbw(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shift_with_count(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_test_op(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_ia32_vpconflict(), interp__builtin_ia32_vpdp(), interp__builtin_inf(), interp__builtin_infer_alloc_token(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_is_within_lifetime(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_load8(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_meta_is_type(), interp__builtin_move(), interp__builtin_nan(), interp__builtin_object_size(), interp__builtin_operator_delete(), interp__builtin_operator_new(), interp__builtin_os_log_format_buffer_size(), interp__builtin_overflowop(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_scalar_fp_round_mask_binop(), interp__builtin_signbit(), interp__builtin_stdc_memreverse8(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_builtin_ia32_cvt_scalar_to_int(), interp_builtin_ia32_cvt_vector_to_int(), interp_floating_comparison(), InterpretBuiltin(), clang::Invalid, isNoopBuiltin(), NormalizeRotateAmount(), pushInteger(), clang::Result, clang::T, V, and X.
Referenced by CallBI(), and InterpretBuiltin().
| bool clang::interp::InterpretOffsetOf | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const OffsetOfExpr * | E, | ||
| ArrayRef< int64_t > | ArrayIndices, | ||
| int64_t & | IntResult ) |
Interpret an offsetof operation.
Definition at line 6976 of file InterpBuiltin.cpp.
References clang::OffsetOfNode::Array, clang::OffsetOfNode::Base, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::OffsetOfNode::Field, clang::CharUnits::fromQuantity(), clang::ASTContext::getAsArrayType(), clang::Type::getAsCXXRecordDecl(), clang::Type::getAsRecordDecl(), clang::interp::State::getASTContext(), clang::ASTContext::getASTRecordLayout(), clang::OffsetOfNode::getBase(), clang::ASTRecordLayout::getBaseClassOffset(), clang::OffsetOfExpr::getComponent(), clang::ArrayType::getElementType(), clang::OffsetOfNode::getField(), clang::ASTRecordLayout::getFieldCount(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::OffsetOfNode::getKind(), clang::interp::InterpFrame::getLocation(), clang::QualType::getNonReferenceType(), clang::OffsetOfExpr::getNumComponents(), clang::CharUnits::getQuantity(), clang::interp::InterpFrame::getRange(), clang::CXXBaseSpecifier::getType(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::OffsetOfExpr::getTypeSourceInfo(), clang::OffsetOfNode::Identifier, InterpretOffsetOf(), clang::Invalid, clang::CXXBaseSpecifier::isVirtual(), clang::ASTContext::recordOffsetOfEvaluation(), clang::Result, and clang::ASTContext::toCharUnitsFromBits().
Referenced by InterpretOffsetOf(), and OffsetOf().
|
inline |
Definition at line 817 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 145 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::InterpState::diagnosing(), clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpFrame::getSource().
Referenced by OffsetHelper().
| bool clang::interp::InvalidCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| CastKind | Kind, | ||
| bool | Fatal ) |
Definition at line 3322 of file Interp.cpp.
References clang::AK_Read, clang::interp::State::CCEDiag(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, Dynamic, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), Reinterpret, ReinterpretLike, ReinterpretPtrToInt, and Volatile.
| bool clang::interp::InvalidDeclRef | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const DeclRefExpr * | DR, | ||
| bool | InitializerFailed ) |
Definition at line 1385 of file Interp.cpp.
References clang::cast(), CheckDeclRef(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::DeclRefExpr::getDecl(), clang::interp::InterpFrame::getSource(), InitializerFailed, and clang::interp::State::Note().
| bool clang::interp::InvalidNewDeleteExpr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Expr * | E ) |
Definition at line 2930 of file Interp.cpp.
References clang::cast(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::isa(), and clang::Type::isNothrowT().
| bool clang::interp::InvalidShuffleVectorIndex | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Index ) |
Definition at line 2988 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 3782 of file Interp.h.
References clang::AK_Assign, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::T, and clang::QualType::withVolatile().
|
inline |
Definition at line 3680 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getLocation(), and clang::interp::InterpFrame::getRange().
|
inline |
Definition at line 4159 of file Interp.h.
References clang::interp::Pointer::isBaseClass(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 4026 of file Interp.h.
References clang::interp::Boolean::from(), clang::interp::InterpState::inConstantContext(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Definition at line 153 of file PrimType.h.
Referenced by interp__builtin_strlen().
Definition at line 53 of file InterpBuiltin.cpp.
References PT_Bool, PT_Sint16, PT_Sint32, PT_Sint64, PT_Sint8, PT_Uint16, PT_Uint32, PT_Uint64, PT_Uint8, and clang::T.
Referenced by clang::interp::Pointer::load(), and clang::interp::Pointer::loadElem().
Definition at line 294 of file EvaluationResult.cpp.
Referenced by lval().
Definition at line 54 of file PrimType.h.
References PT_Bool, and clang::T.
Referenced by clang::interp::Descriptor::getElemDataSize(), interp__builtin_load8(), toRValue(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
Definition at line 55 of file PrimType.h.
References PT_IntAPS, and clang::T.
Referenced by clang::interp::Context::evaluateStrlen(), interp__builtin_is_aligned_up_down(), interp__builtin_vector_reduce(), Neg(), and clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr().
Definition at line 144 of file PrimType.h.
Referenced by Add(), AddSubMulHelper(), BitAnd(), BitOr(), BitXor(), Cast(), CastAP(), CastAPS(), CastIntegralFloating(), CastPointerIntegral(), CheckDivRem(), CmpHelper(), GetIntPtr(), IncDecHelper(), InitBitField(), InitBitFieldActivate(), InitThisBitField(), InitThisBitFieldActivate(), Mul(), Sub(), and SubPtr().
|
inline |
Definition at line 3171 of file Interp.h.
References clang::interp::Boolean::from(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
Definition at line 35 of file InterpBuiltin.cpp.
Referenced by InterpretBuiltin().
Determine if T is a character type for which we guarantee that sizeof(T) == 1.
Definition at line 2177 of file InterpBuiltin.cpp.
References clang::T.
Referenced by interp__builtin_memcmp().
|
static |
Definition at line 183 of file EvaluationResult.cpp.
References clang::interp::Descriptor::ElemRecord, clang::interp::Descriptor::getPrimType(), clang::interp::Record::hasPtrField(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), and PT_Ptr.
Referenced by collectBlocks(), and lvalFields().
Definition at line 57 of file PrimType.h.
References PT_MemberPtr, PT_Ptr, and clang::T.
Referenced by DecayPtr(), clang::interp::Compiler< Emitter >::visitAPValue(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
Check for common reasons a pointer can't be read from, which are usually not diagnosed in a builtin function.
Definition at line 103 of file InterpBuiltin.cpp.
References clang::interp::Pointer::isDummy(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isOnePastEnd(), and clang::interp::Pointer::isReadablePointerType().
Referenced by interp__builtin_carryop(), interp__builtin_load8(), interp__builtin_memchr(), interp__builtin_memcpy(), and interp__builtin_stdc_memreverse8().
Check if E has side-effects.
This is used to avoid some temporary variables and is supposed to be a quick check, not exhaustive. That's why we're not using Expr::HasSideEffects().
Definition at line 44 of file Compiler.cpp.
References clang::isa().
Referenced by clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), and clang::interp::Compiler< Emitter >::VisitFloatCompoundAssignOperator().
Definition at line 61 of file PrimType.h.
References PT_Sint16, PT_Sint32, PT_Sint64, PT_Sint8, and clang::T.
Referenced by pushInteger(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
| bool clang::interp::LE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1512 of file Interp.h.
References CmpHelper(), clang::Equal, and clang::Less.
Referenced by clang::interp::Compiler< Emitter >::VisitIntegerLiteral().
| bool clang::interp::Load | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2189 of file Interp.h.
References CheckLoad(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::LoadPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2200 of file Interp.h.
References CheckLoad(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Like LoadPop above, but if any of the checks fail, we turn the pointer into an opaque pointer of appropriate type.
Definition at line 2212 of file Interp.h.
References CheckLoad(), clang::Expr::EvalStatus::Diag, clang::interp::State::getEvalStatus(), clang::interp::InterpStack::pop(), PT_Ptr, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and clang::interp::OpaquePointer::withFieldType().
| bool clang::interp::LT | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1505 of file Interp.h.
References CmpHelper(), and clang::Less.
Referenced by CheckLifetime(), CheckShift(), diagnoseUninitialized(), DoShift(), DoShiftAP(), Shl(), Shr(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitFloatCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), clang::interp::Compiler< Emitter >::VisitPointerCompoundAssignOperator(), and clang::interp::Compiler< Emitter >::visitSwitchStmt().
|
static |
Definition at line 345 of file EvaluationResult.cpp.
References clang::interp::Pointer::block(), checkFunctionPtr(), clang::FixItHint::CreateInsertion(), clang::ASTContext::CUDAConstantEvalCtx, clang::interp::State::FFDiag(), clang::DeclaratorDecl::getBeginLoc(), clang::Expr::getExprLoc(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::interp::Pointer::getType(), clang::interp::Pointer::isBlockPointer(), clang::VarDecl::isConstexpr(), clang::QualType::isDestructedType(), isForManglingOnly(), isGlobalLValue(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), lval(), lvalFields(), clang::interp::State::Note(), clang::ASTContext::CUDAConstantEvalContext::NoWrongSidedVars, and PT_Ptr.
Referenced by clang::interp::EvaluationResult::checkLValue(), lval(), and lvalFields().
|
static |
Definition at line 454 of file EvaluationResult.cpp.
References clang::interp::Pointer::block(), clang::interp::EvaluationResult::checkMemberPointer(), clang::interp::PtrView::deref(), clang::interp::Descriptor::ElemRecord, clang::interp::Descriptor::getElemQualType(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::PtrView::getType(), clang::interp::Record::hasPtrField(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isCompositeArray(), isOrHasPtr(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), lval(), lvalFields(), PT_MemberPtr, and PT_Ptr.
Referenced by clang::interp::EvaluationResult::checkLValueFields(), lval(), and lvalFields().
| bool clang::interp::MarkDestroyed | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2757 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), Destroyed, clang::interp::InterpStack::peek(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
| bool clang::interp::Memcpy | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 3726 of file Interp.cpp.
References CheckLoad(), DoMemcpy(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Mul | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 480 of file Interp.h.
References AddSubMulHelper(), clang::Invalid, isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 507 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpState::allocFloat(), clang::C, clang::interp::Floating::copy(), clang::interp::Pointer::elem(), HandleComplexComplexMul(), needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 493 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), clang::interp::Floating::mul(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3435 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::NE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1498 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
Referenced by dtorArrayTy(), and clang::interp::Descriptor::getDynAllocKindForExpr().
Definition at line 135 of file PrimType.h.
Referenced by AddSubMulHelper(), BitAnd(), BitCastPrim(), BitOr(), BitXor(), Comp(), Const(), copyPrimitiveMemory(), Div(), Divc(), DoShift(), DoShiftAP(), finishGlobalRecurse(), IncDecHelper(), InitBitField(), InitBitFieldActivate(), InitGlobal(), Mulc(), Neg(), Rem(), Shl(), and Shr().
Definition at line 140 of file PrimType.h.
References PT_Float, PT_IntAP, PT_IntAPS, PT_MemberPtr, and clang::T.
| bool clang::interp::Neg | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 828 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpState::allocFloat(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), handleOverflow(), isIntegerType(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::pop(), PT_FixedPoint, clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3425 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getCallee(), clang::Decl::getEndLoc(), and PRESERVE_NONE.
|
static |
Definition at line 219 of file Interp.cpp.
References clang::interp::Block::getDescriptor(), clang::interp::Descriptor::getLocation(), clang::interp::Block::isDynamic(), clang::interp::Block::isTemporary(), and clang::interp::State::Note().
Referenced by CheckDeleteSource(), CheckLifetime(), CheckLive(), CheckLoad(), CheckTemporary(), diagnoseUninitialized(), diagnoseUnreadableObject(), and noteValueLocation().
| void clang::interp::noteValueLocation | ( | InterpState & | S, |
| const Pointer & | Ptr ) |
Definition at line 230 of file Interp.cpp.
References clang::interp::State::Note(), and noteValueLocation().
|
inline |
Definition at line 3150 of file Interp.h.
References clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Reflect::Reflect().
| std::optional< Pointer > clang::interp::OffsetHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const T & | Offset, | ||
| const Pointer & | Ptr ) |
Definition at line 2505 of file Interp.h.
References Add, clang::interp::PtrView::atIndex(), clang::interp::PtrView::Base, CheckArray(), diagnoseArrayIndex(), clang::interp::State::getASTContext(), clang::interp::PtrView::getFieldDesc(), clang::interp::PtrView::getIndex(), clang::interp::State::getLangOpts(), clang::interp::PtrView::getNumElems(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::interp::PtrView::inArray(), Invalid(), clang::interp::Descriptor::isArray(), clang::QualType::isNull(), clang::interp::PtrView::isOnePastEnd(), clang::Type::isVoidType(), clang::interp::PtrView::Pointee, Pointer, clang::Result, clang::T, and V.
Referenced by AddOffset(), arrayElemPtr(), IncDecPtrHelper(), and SubOffset().
|
inline |
Definition at line 3823 of file Interp.h.
References clang::OffsetOfExpr::getNumExpressions(), InterpretOffsetOf(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
| Char< Signed > | I ) |
Definition at line 218 of file Char.h.
References clang::interp::Char< Signed >::print().
|
inline |
Definition at line 148 of file Boolean.h.
References clang::interp::Boolean::print().
|
inline |
Definition at line 175 of file MemberPointer.h.
References clang::interp::MemberPointer::print().
|
inline |
Definition at line 1380 of file Pointer.h.
References clang::interp::Pointer::expand(), clang::interp::Pointer::getArray(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isArrayRoot(), clang::interp::Pointer::isBaseClass(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Pointer::isInitialized(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isZero(), and clang::interp::Pointer::print().
|
inline |
|
inline |
Definition at line 64 of file DeclOrExpr.h.
References clang::interp::DeclOrExpr::getOpaqueValue().
|
inline |
Definition at line 190 of file FixedPoint.h.
References clang::interp::FixedPoint::print().
| 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().
| llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
| Integral< Bits, Signed > | I ) |
Definition at line 443 of file Integral.h.
References clang::interp::Integral< Bits, Signed >::print().
|
inline |
Definition at line 371 of file IntegralAP.h.
References clang::interp::IntegralAP< Signed >::print().
|
inline |
Definition at line 115 of file PrimType.h.
References Dynamic, Reinterpret, ReinterpretLike, ReinterpretPtrToInt, and Volatile.
Definition at line 3781 of file Interp.cpp.
Referenced by BCP(), and Interpret().
| bool clang::interp::Pop | ( | InterpState & | S | ) |
Definition at line 1545 of file Interp.h.
References clang::interp::InterpStack::discard(), clang::interp::InterpState::Stk, and clang::T.
|
inline |
Definition at line 3749 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3699 of file Interp.h.
References clang::Expr::EvalStatus::Diag, clang::Expr::EvalStatus::DiagEmitted, clang::interp::InterpState::DiagIgnoreDepth, clang::interp::State::getEvalStatus(), clang::interp::InterpState::PrevDiags, and clang::interp::InterpState::PrevDiagsEmitted.
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
|
inline |
Definition at line 3760 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Definition at line 84 of file InterpBuiltin.cpp.
References INT_TYPE_SWITCH, clang::interp::InterpStack::pop(), and clang::T.
Referenced by interp__builtin_abs(), interp__builtin_assume_aligned(), interp__builtin_bswap(), interp__builtin_carryop(), interp__builtin_clz(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_fp_binop(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_int_unaryop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_triop(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_cmp_mask(), interp__builtin_ia32_cvt_mask2vec(), interp__builtin_ia32_cvtpd2ps(), interp__builtin_ia32_cvtsd2ss(), interp__builtin_ia32_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_is_aligned_up_down(), interp__builtin_isfpclass(), interp__builtin_memchr(), interp__builtin_object_size(), interp__builtin_operator_new(), interp__builtin_overflowop(), interp__builtin_popcount(), interp__builtin_scalar_fp_round_mask_binop(), popToAPSInt(), and popToAPSInt().
|
static |
Definition at line 94 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::Expr::getType(), popToAPSInt(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 97 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), popToAPSInt(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 74 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::Expr::getType(), and INT_TYPE_SWITCH.
Referenced by interp__builtin_atomic_lock_free(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_ia32_crc32(), interp__builtin_ia32_dbpsadbw(), interp__builtin_ia32_mpsadbw(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_scalar_fp_round_mask_binop(), interp__builtin_stdc_memreverse8(), and interp__builtin_strcmp().
| bool clang::interp::PreDec | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
Definition at line 1091 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::PreDecBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| uint32_t | BitWidth ) |
Definition at line 1101 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::PreInc | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
Definition at line 1012 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::PreIncBitfield | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow, | ||
| uint32_t | BitWidth ) |
Definition at line 1023 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
Returns the size of a primitive type in bytes.
Definition at line 25 of file PrimType.cpp.
References clang::T, and TYPE_SWITCH.
Referenced by AllocN(), Call(), CallPtr(), CallVar(), CallVirt(), CheckNonNullArgs(), clang::interp::Program::createDescriptor(), clang::interp::InterpFrame::describe(), clang::interp::Descriptor::Descriptor(), clang::interp::Descriptor::Descriptor(), clang::interp::Descriptor::Descriptor(), clang::interp::InterpStack::dump(), clang::interp::Context::getOrCreateFunction(), clang::interp::Context::getOrCreateObjCBlock(), clang::interp::Function::getWrittenArgSize(), clang::interp::Compiler< Emitter >::VisitCallExpr(), and clang::interp::Compiler< Emitter >::VisitCXXConstructExpr().
| bool clang::interp::PseudoDtor | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the pop'd pointer.
Definition at line 2749 of file Interp.cpp.
References checkDestructor(), Ended, clang::interp::InterpStack::pop(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
| bool clang::interp::PtrPtrCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | SrcIsVoidPtr, | ||
| const Type * | TargetType ) |
Definition at line 2016 of file Interp.cpp.
References clang::interp::Pointer::asOpaquePointer(), clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getASTContext(), clang::interp::Pointer::getByteOffset(), clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::Type::getPointeeType(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::getStdAllocatorCaller(), clang::ASTContext::hasSimilarType(), clang::Invalid, clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and validType().
|
inline |
Definition at line 3745 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3687 of file Interp.h.
References clang::Expr::EvalStatus::Diag, clang::Expr::EvalStatus::DiagEmitted, clang::interp::InterpState::DiagIgnoreDepth, clang::interp::InterpState::diagnosing(), clang::interp::State::getEvalStatus(), clang::interp::InterpState::PrevDiags, and clang::interp::InterpState::PrevDiagsEmitted.
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
|
static |
Pushes Val on the stack as the type given by QT.
Definition at line 116 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocAP(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getIntWidth(), INT_TYPE_SWITCH, clang::Type::isSignedIntegerOrEnumerationType(), isSignedType(), clang::Type::isUnsignedIntegerOrEnumerationType(), PT_IntAP, PT_IntAPS, clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, clang::T, and V.
Referenced by interp__builtin_abs(), interp__builtin_bswap(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clz(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_int_unaryop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_triop(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_cmp_mask(), interp__builtin_ia32_crc32(), interp__builtin_ia32_cvt_vec2mask(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_test_op(), interp__builtin_ia32_vec_ext(), interp__builtin_infer_alloc_token(), interp__builtin_is_aligned_up_down(), interp__builtin_is_within_lifetime(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_load8(), interp__builtin_memcmp(), interp__builtin_object_size(), interp__builtin_os_log_format_buffer_size(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_builtin_ia32_cvt_scalar_to_int(), interp_floating_comparison(), InterpretBuiltin(), and pushInteger().
|
static |
Definition at line 149 of file InterpBuiltin.cpp.
References pushInteger(), and clang::T.
|
inline |
Definition at line 3754 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
inline |
Definition at line 4168 of file Interp.h.
References clang::interp::CodePtr::read(), and clang::T.
|
inline |
Definition at line 4210 of file Interp.h.
References align(), clang::interp::FixedPoint::bytesToSerialize(), and clang::interp::FixedPoint::deserialize().
|
inline |
Definition at line 4175 of file Interp.h.
References align(), clang::interp::InterpState::allocFloat(), clang::interp::Floating::deserialize(), and clang::interp::Floating::deserializeSemantics().
|
inline |
|
inline |
| bool clang::interp::readPointerToBuffer | ( | const Context & | Ctx, |
| const Pointer & | FromPtr, | ||
| BitcastBuffer & | Buffer, | ||
| bool | ReturnOnUninit ) |
Definition at line 347 of file InterpBuiltinBitCast.cpp.
References Big, BITCAST_TYPE_SWITCH, clang::interp::Floating::bitcastToMemory(), clang::interp::PtrView::deref(), enumeratePointerFields(), Failure, clang::interp::Floating::getAPFloat(), clang::interp::Context::getASTContext(), clang::interp::Bits::getQuantity(), clang::ASTContext::getTargetInfo(), clang::if(), clang::interp::PtrView::isInitialized(), clang::TargetInfo::isLittleEndian(), Little, clang::interp::BitcastBuffer::markInitialized(), PT_Float, clang::interp::BitcastBuffer::pushData(), clang::Result, clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), Success, swapBytes(), and clang::T.
Referenced by DoBitCast(), DoBitCastPtr(), and interp__builtin_memcmp().
|
inline |
Definition at line 4153 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| 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 748 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckDivRem(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.
| PRESERVE_NONE bool clang::interp::Ret | ( | InterpState & | S | ) |
Definition at line 276 of file Interp.h.
References cleanupAfterFunctionCall(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getFrameOffset(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRetPC(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpState::PC, clang::interp::InterpStack::pop(), PRESERVE_NONE, clang::interp::InterpStack::push(), Ret(), clang::interp::InterpStack::size(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Record::getName(), and Ret().
|
inline |
Definition at line 294 of file Interp.h.
References cleanupAfterFunctionCall(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getFrameOffset(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRetPC(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpState::PC, PRESERVE_NONE, clang::interp::InterpStack::size(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1473 of file Interp.cpp.
References clang::interp::Pointer::atIndex(), clang::interp::Descriptor::ElemDesc, clang::interp::Block::getDescriptor(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::hasTrivialDtor(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::narrow(), Pointer, and runRecordDestructor().
Referenced by Free().
|
static |
Definition at line 1446 of file Interp.cpp.
References Call, clang::interp::InterpState::Current, Dtor, clang::interp::Descriptor::ElemRecord, clang::interp::State::FFDiag(), clang::interp::InterpState::getContext(), clang::interp::InterpFrame::getFunction(), clang::interp::Context::getOrCreateFunction(), clang::interp::InterpFrame::getSource(), clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::hasThisPointer(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::Function::isDestructor(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::pointToSameBlock(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by RunDestructors().
|
inline |
Definition at line 3210 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRVOPtr(), clang::interp::Function::hasRVO(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by Call().
| bool clang::interp::SetGlobal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 2717 of file Interp.cpp.
References setLifeStateRecurse(), and Started.
Referenced by EndLifetime(), MarkDestroyed(), PseudoDtor(), and setLifeStateRecurse().
| bool clang::interp::SetLocal | ( | InterpState & | S, |
| 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 1628 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setLocal(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::SetParam | ( | InterpState & | S, |
| uint32_t | I ) |
Definition at line 1643 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setParam(), clang::interp::InterpState::Stk, and clang::T.
| 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 7061 of file InterpBuiltin.cpp.
References clang::interp::PtrView::deref(), clang::interp::PtrView::getFieldDesc(), clang::interp::Descriptor::getPrimType(), clang::interp::PtrView::initialize(), INT_TYPE_SWITCH, SetThreeWayComparisonField(), and clang::T.
Referenced by CMP3(), and SetThreeWayComparisonField().
|
inlinestatic |
Definition at line 3386 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getLocation(), clang::interp::FixedPoint::getSemantics(), clang::Expr::getType(), handleFixedPointOverflow(), Left, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::FixedPoint::shiftLeft(), clang::interp::FixedPoint::shiftRight(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3368 of file Interp.h.
References clang::interp::InterpState::allocAP(), DoShift(), DoShiftAP(), LT(), needsAlloc(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3349 of file Interp.h.
References clang::interp::InterpState::allocAP(), DoShift(), DoShiftAP(), LT(), needsAlloc(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3770 of file Interp.h.
References clang::interp::State::noteSideEffect().
|
inline |
Definition at line 3794 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpState::inConstantContext().
|
inline |
Definition at line 3723 of file Interp.h.
References clang::interp::InterpState::InitializingPtrs, clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3717 of file Interp.h.
References clang::interp::InterpState::InitializingPtrs, clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 2668 of file Interp.cpp.
References clang::interp::PtrView::getLifetime(), Started, and startLifetimeRecurse().
Referenced by CheckNewTypeMismatch(), DefaultInit(), startLifetimeRecurse(), and StartThisLifetime().
|
inline |
Definition at line 3710 of file Interp.h.
References clang::interp::InterpState::SpeculationDepth.
| bool clang::interp::StartThisLifetime | ( | InterpState & | S | ) |
Definition at line 2693 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), and startLifetimeRecurse().
| bool clang::interp::StartThisLifetime1 | ( | InterpState & | S | ) |
Definition at line 2704 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::getThis().
| bool clang::interp::Store | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2251 of file Interp.h.
References CheckStore(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreActivate | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2294 of file Interp.h.
References clang::AK_Assign, CheckStore(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreActivatePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2307 of file Interp.h.
References clang::AK_Assign, CheckStore(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreBitField | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2320 of file Interp.h.
References CheckStore(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2349 of file Interp.h.
References clang::AK_Assign, CheckStore(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreBitFieldActivatePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2365 of file Interp.h.
References clang::AK_Assign, CheckStore(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StoreBitFieldPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2335 of file Interp.h.
References CheckStore(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::StorePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2264 of file Interp.h.
References CheckStore(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.
| bool clang::interp::Sub | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 426 of file Interp.h.
References AddSubMulHelper(), AddSubNonNumber(), clang::cast(), clang::Invalid, isIntegralOrPointer(), LabelAddress, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
Referenced by clang::interp::Compiler< Emitter >::VisitUnaryOperator(), and clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 468 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::interp::Floating::sub().
| bool clang::interp::SubOffset | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2655 of file Interp.h.
References addSubOffsetOpaque(), CheckNull(), clang::CSK_ArrayIndex, clang::interp::State::getLangOpts(), OffsetHelper(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, Sub, and clang::T.
|
inline |
1) Pops a Pointer from the stack.
2) Pops another Pointer from the stack. 3) Pushes the difference of the indices of the two pointers on the stack.
Definition at line 2746 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::Pointer::computeLayoutOffset(), clang::interp::InterpState::Current, clang::interp::Pointer::elemsOfSameArray(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getConstantArrayType(), clang::Decl::getDeclContext(), clang::AddrLabelExpr::getLabel(), clang::interp::Pointer::getPointedToLabel(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), handleOverflow(), clang::interp::Pointer::hasSameBase(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), isIntegralOrPointer(), clang::Normal, clang::interp::Pointer::pointsToLabel(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::T, and clang::interp::Pointer::toDiagnosticString().
|
inlinestatic |
Definition at line 22 of file InterpBuiltinBitCast.h.
Referenced by DoBitCast(), DoBitCastPtr(), interp__builtin_memcmp(), and readPointerToBuffer().
|
inline |
Definition at line 3183 of file Interp.h.
References clang::cast(), clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::Function::getDecl(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getThis(), clang::isa(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
Referenced by clang::interp::Context::evaluateWithSubstitution(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisBitFieldActivate(), InitThisField(), InitThisFieldActivate(), clang::interp::EvalEmitter::interpretWithSubstitutions(), This(), clang::interp::ByteCodeEmitter::visitWithSubstitutions(), clang::interp::Compiler< Emitter >::visitWithSubstitutions(), clang::interp::EvalEmitter::visitWithSubstitutions(), and clang::interp::Context::~Context().
|
inline |
Definition at line 2478 of file Interp.h.
References clang::Member, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::TrivialCopy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | Activate, | ||
| const Function * | Func ) |
Definition at line 3741 of file Interp.cpp.
References Activate(), clang::AK_MemberCall, clang::AK_Read, clang::interp::InterpFrame::allocSize(), clang::interp::State::checkingPotentialConstantExpression(), CheckLoad(), CheckStore(), clang::interp::InterpState::Current, DoMemcpy(), clang::Func, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isConstexprUnknown(), clang::interp::Pointer::isDummy(), clang::Memory, clang::interp::InterpState::PC, clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Just emit a diagnostic.
The expression that caused emission of this op is not valid in a constant context.
Definition at line 3673 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getLocation(), and clang::interp::InterpFrame::getRange().
| bool clang::interp::virtBaseHelper | ( | InterpState & | S, |
| const CXXRecordDecl * | Decl, | ||
| const Pointer & | Ptr ) |
Definition at line 3694 of file Interp.cpp.
References clang::interp::PointerPathEntry::base(), clang::interp::InterpState::extendPointerPath(), clang::interp::State::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::interp::OpaquePointer::getFieldType(), clang::CanQual< T >::getTypePtr(), clang::Type::isRecordType(), clang::interp::OpaquePointer::Path, clang::interp::OpaquePointer::PathLength, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::OpaquePointer::withPath().
Referenced by GetPtrThisVirtBase(), GetPtrVirtBase(), and GetPtrVirtBasePop().
| bool clang::interp::Zero | ( | InterpState & | S | ) |
Definition at line 3128 of file Interp.h.
References clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.
|
static |
Definition at line 7078 of file InterpBuiltin.cpp.
References clang::interp::PtrView::atField(), clang::interp::PtrView::atIndex(), clang::interp::Descriptor::ElemRecord, clang::interp::PtrView::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::PtrView::narrow(), TYPE_SWITCH, and zeroAll().
Referenced by copyRecord(), and zeroAll().
|
inlinestatic |
Definition at line 3133 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 3141 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| const InterpFn clang::interp::InterpFunctions[] |
Definition at line 3803 of file Interp.cpp.
Referenced by BCP(), and Interpret().