|
clang 23.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 | 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 | 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... | |
| 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 | DestructorScope |
| 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 |
| 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... | |
| 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 |
| class | LabelScope |
| 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 |
| 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 | 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_Sint16 > |
| struct | PrimConv< PT_Sint32 > |
| struct | PrimConv< PT_Sint64 > |
| struct | PrimConv< PT_Sint8 > |
| struct | PrimConv< PT_Uint16 > |
| struct | PrimConv< PT_Uint32 > |
| struct | PrimConv< PT_Uint64 > |
| struct | PrimConv< PT_Uint8 > |
| class | Program |
| The program contains and links the bytecode for all functions. More... | |
| class | Record |
| Structure/Class descriptor. More... | |
| 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 | 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 |
| class | StmtExprScope |
| 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 | DeclTy = llvm::PointerUnion<const Decl *, const Expr *> |
| using | BlockCtorFn |
| Invoked whenever a block is created. | |
| using | BlockDtorFn |
| Invoked when a block is destroyed. | |
| using | APInt = llvm::APInt |
| using | APSInt = llvm::APSInt |
| using | APFloat = llvm::APFloat |
| using | FunctionDeclTy |
| using | InterpFn = bool (*)(InterpState &, CodePtr &PC) PRESERVE_NONE |
| using | FixedPointSemantics = llvm::FixedPointSemantics |
| using | CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)> |
| using | SourceMap = std::vector<std::pair<unsigned, SourceInfo>> |
Enumerations | |
| enum class | Endian { Little , Big } |
| enum class | ScopeKind { Block , FullExpression , Call } |
| enum class | GlobalInitState { Initialized , NoInitializer , InitializerFailed } |
| enum class | Lifetime : uint8_t { Started , Ended } |
| enum class | ShiftDir { Left , Right } |
| enum class | ArithOp { Add , Sub } |
| enum class | PushVal : bool { No , Yes } |
| enum class | IncDecOp { Inc , Dec } |
| enum | Opcode : uint32_t |
| enum class | Storage { Int , Block , Fn , Typeid } |
| enum | PrimType : uint8_t { PT_Sint8 = 0 , PT_Uint8 = 1 , PT_Sint16 = 2 , PT_Uint16 = 3 , PT_Sint32 = 4 , PT_Uint32 = 5 , PT_Sint64 = 6 , PT_Uint64 = 7 , PT_IntAP = 8 , PT_IntAPS = 9 , PT_Bool = 10 , PT_FixedPoint = 11 , PT_Float = 12 , PT_Ptr = 13 , PT_MemberPtr = 14 } |
| Enumeration of the primitive types of the VM. More... | |
| enum class | CastKind : uint8_t { Reinterpret , ReinterpretLike , Volatile , Dynamic } |
Functions | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Boolean &B) |
| static std::optional< bool > | getBoolValue (const Expr *E) |
| static void | DiagnoseUninitializedSubobject (InterpState &S, SourceLocation Loc, const FieldDecl *SubObjDecl) |
| static bool | CheckFieldsInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const Record *R) |
| static bool | CheckArrayInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const ConstantArrayType *CAT) |
| static bool | isOrHasPtr (const Descriptor *D) |
| static void | collectBlocks (const Pointer &Ptr, llvm::SetVector< const Block * > &Blocks) |
| 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 PRESERVE_NONE bool | BCP (InterpState &S, CodePtr &RealPC, int32_t Offset, PrimType PT) |
| This is used to implement speculative execution via __builtin_constant_p when we generate bytecode. | |
| static void | popArg (InterpState &S, const Expr *Arg) |
| void | cleanupAfterFunctionCall (InterpState &S, CodePtr OpPC, const Function *Func) |
| bool | isConstexprUnknown (const Block *B) |
| bool | isConstexprUnknown (const Pointer &P) |
| bool | CheckBCPResult (InterpState &S, const Pointer &Ptr) |
| bool | CheckActive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK, bool WillActivate) |
| bool | CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if the variable has externally defined storage. | |
| 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) |
| Checks if the Descriptor is of a constexpr or const global variable. | |
| static bool | CheckConstant (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| bool | CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK) |
| Checks if a pointer is null. | |
| bool | CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| Checks if a pointer is in range. | |
| 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. | |
| bool | CheckDowncast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Offset) |
| Checks if the dowcast using the given offset is possible with the given pointer. | |
| bool | CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if a pointer points to const storage. | |
| bool | CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| Checks if a pointer points to a mutable field. | |
| static bool | CheckVolatile (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| bool | DiagnoseUninitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| bool | DiagnoseUninitialized (InterpState &S, CodePtr OpPC, bool Extern, const Descriptor *Desc, AccessKinds AK) |
| static bool | CheckLifetime (InterpState &S, CodePtr OpPC, Lifetime LT, 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, 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, bool WillBeActivated=false) |
| Checks if a value can be stored in a block. | |
| static bool | CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| 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 | 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 Expr *Source, 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 | CheckDummy (InterpState &S, CodePtr OpPC, const Block *B, 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 | 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 | checkConstructor (InterpState &S, CodePtr OpPC, const Function *Func, const Pointer &ThisPtr) |
| 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) |
| static void | compileFunction (InterpState &S, const Function *Func) |
| 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, Pointer TypePtr, const CXXRecordDecl *&DynamicDecl) |
| 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 (const Pointer &Ptr) |
| bool | StartLifetime (InterpState &S, CodePtr OpPC) |
| static void | endLifetimeRecurse (const Pointer &Ptr) |
| bool | EndLifetime (InterpState &S, CodePtr OpPC) |
| Ends the lifetime of the peek'd pointer. | |
| bool | EndLifetimePop (InterpState &S, CodePtr OpPC) |
| Ends the lifetime of the pop'd pointer. | |
| 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 | 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 | 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, CodePtr OpPC, 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, const Pointer &Ptr, PrimType T) |
| template<typename T> | |
| static void | copyPrimitiveMemory (InterpState &S, const Pointer &Ptr) |
| static void | finishGlobalRecurse (InterpState &S, const Pointer &Ptr) |
| bool | FinishInitGlobal (InterpState &S, CodePtr OpPC) |
| 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, CodePtr OpPC, int32_t Off, const RecordDecl *BaseDecl) |
| DerivedToBaseMemberPointer. | |
| bool | CastMemberPtrDerivedPop (InterpState &S, CodePtr OpPC, int32_t Off, const RecordDecl *BaseDecl) |
| BaseToDerivedMemberPointer. | |
| 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, CodePtr &PC) |
| PRESERVE_NONE bool | RetVoid (InterpState &S, CodePtr &PC) |
| template<typename T, bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP> | |
| bool | AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Add (InterpState &S, CodePtr OpPC) |
| bool | Addf (InterpState &S, CodePtr OpPC, 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, CodePtr OpPC) |
| 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, CodePtr OpPC) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitOr (InterpState &S, CodePtr OpPC) |
| 1) Pops the RHS from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | BitXor (InterpState &S, CodePtr OpPC) |
| 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, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Neg (InterpState &S, CodePtr OpPC) |
| template<typename T, IncDecOp Op, PushVal DoPush> | |
| bool | IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, 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, CodePtr OpPC) |
| 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) |
| static bool | IsOpaqueConstantCall (const CallExpr *E) |
| 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, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Pop (InterpState &S, CodePtr OpPC) |
| template<PrimType TopName, PrimType BottomName> | |
| bool | Flip (InterpState &S, CodePtr OpPC) |
| [Value1, Value2] -> [Value2, Value1] | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Const (InterpState &S, CodePtr OpPC, const T &Arg) |
| bool | ConstFloat (InterpState &S, CodePtr OpPC, 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, CodePtr OpPC, uint32_t I) |
| 1) Pops the value from the stack. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetParam (InterpState &S, CodePtr OpPC, uint32_t Index) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SetParam (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetField (InterpState &S, CodePtr OpPC, uint32_t I) |
| 1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SetField (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I) |
| 1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetGlobalUnchecked (InterpState &S, CodePtr OpPC, uint32_t I) |
| Same as GetGlobal, but without the checks. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | InitGlobalTemp (InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp) |
| 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that | |
| bool | InitGlobalTempComp (InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp) |
| 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that | |
| 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, CodePtr OpPC, uint32_t I) |
| bool | GetRefLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t Index) |
| bool | GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK, const Type *TargetType) |
| bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK) |
| bool | GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | FinishInitPop (InterpState &S, CodePtr OpPC) |
| bool | FinishInit (InterpState &S, CodePtr OpPC) |
| bool | FinishInitActivate (InterpState &S, CodePtr OpPC) |
| bool | FinishInitActivatePop (InterpState &S, CodePtr OpPC) |
| bool | Dump (InterpState &S, CodePtr OpPC) |
| bool | CheckNull (InterpState &S, CodePtr OpPC) |
| bool | VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr) |
| bool | GetPtrVirtBasePop (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
| bool | GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Load (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | LoadPop (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Store (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | StorePop (InterpState &S, CodePtr OpPC) |
| static bool | Activate (InterpState &S, CodePtr OpPC) |
| static bool | ActivateThisField (InterpState &S, CodePtr OpPC, 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 | Memcpy (InterpState &S, CodePtr OpPC) |
| bool | ToMemberPtr (InterpState &S, CodePtr OpPC) |
| 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, bool IsPointerArith=false) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | AddOffset (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SubOffset (InterpState &S, CodePtr OpPC) |
| template<ArithOp Op> | |
| static bool | IncDecPtrHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| static bool | IncPtr (InterpState &S, CodePtr OpPC) |
| static bool | DecPtr (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | SubPtr (InterpState &S, CodePtr OpPC, bool ElemSizeIsZero) |
| 1) Pops a Pointer from the stack. | |
| bool | InitScope (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | EnableLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
| bool | GetLocalEnabled (InterpState &S, CodePtr OpPC, uint32_t I) |
| template<PrimType TIn, PrimType TOut> | |
| bool | Cast (InterpState &S, CodePtr OpPC) |
| bool | CastFP (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
| 1) Pops a Floating from the stack. | |
| bool | CastFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be. | |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CastFloatingIntegral (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| static bool | CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI) |
| static bool | CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI) |
| 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, CodePtr OpPC, 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) |
| static bool | PtrPtrCast (InterpState &S, CodePtr OpPC, bool SrcIsVoidPtr) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Zero (InterpState &S, CodePtr OpPC) |
| static bool | ZeroIntAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| static bool | ZeroIntAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Null (InterpState &S, CodePtr OpPC, uint64_t Value, const Descriptor *Desc) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | IsNonNull (InterpState &S, CodePtr OpPC) |
| bool | This (InterpState &S, CodePtr OpPC) |
| bool | RVOPtr (InterpState &S, CodePtr OpPC) |
| 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, CodePtr OpPC) |
| bool | NarrowPtr (InterpState &S, CodePtr OpPC) |
| bool | ExpandPtr (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | ArrayElemPtr (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | ArrayElemPtrPop (InterpState &S, CodePtr OpPC) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | ArrayElem (InterpState &S, CodePtr OpPC, uint32_t Index) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | ArrayElemPop (InterpState &S, CodePtr OpPC, uint32_t Index) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | CopyArray (InterpState &S, CodePtr OpPC, uint32_t SrcIndex, uint32_t DestIndex, uint32_t Size) |
| bool | ArrayDecay (InterpState &S, CodePtr OpPC) |
| Just takes a pointer and checks if it's an incomplete array type. | |
| bool | GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | GetIntPtr (InterpState &S, CodePtr OpPC, const Descriptor *Desc) |
| bool | GetMemberPtr (InterpState &S, CodePtr OpPC, const ValueDecl *D) |
| bool | GetMemberPtrBase (InterpState &S, CodePtr OpPC) |
| bool | GetMemberPtrDecl (InterpState &S, CodePtr OpPC) |
| bool | Unsupported (InterpState &S, CodePtr OpPC) |
| Just emit a diagnostic. | |
| bool | PushIgnoreDiags (InterpState &S, CodePtr OpPC) |
| bool | PopIgnoreDiags (InterpState &S, CodePtr OpPC) |
| bool | StartSpeculation (InterpState &S, CodePtr OpPC) |
| PRESERVE_NONE bool | EndSpeculation (InterpState &S, CodePtr &OpPC) |
| bool | PushCC (InterpState &S, CodePtr OpPC, bool Value) |
| bool | PopCC (InterpState &S, CodePtr OpPC) |
| bool | PushMSVCCE (InterpState &S, CodePtr OpPC) |
| bool | PopMSVCCE (InterpState &S, CodePtr OpPC) |
| bool | Error (InterpState &S, CodePtr OpPC) |
| Do nothing and just abort execution. | |
| bool | SideEffect (InterpState &S, CodePtr OpPC) |
| bool | CtorCheck (InterpState &S, CodePtr OpPC) |
| 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, CodePtr OpPC) |
| OldPtr -> Integer -> NewPtr. | |
| bool | CheckDecl (InterpState &S, CodePtr OpPC, const VarDecl *VD) |
| 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, CodePtr OpPC) |
| static bool | CheckAllocations (InterpState &S, CodePtr OpPC) |
| 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) |
| 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 void | discard (InterpStack &Stk, PrimType T) |
| static uint64_t | popToUInt64 (const InterpState &S, const Expr *E) |
| static APSInt | popToAPSInt (InterpStack &Stk, PrimType T) |
| static APSInt | popToAPSInt (InterpState &S, const Expr *E) |
| static APSInt | popToAPSInt (InterpState &S, QualType T) |
| 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 | assignInteger (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 llvm::APSInt | convertBoolVectorToInt (const Pointer &Val) |
| static bool | convertDoubleToFloatStrict (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 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, unsigned BuiltinOp) |
| (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_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 std::optional< unsigned > | computeFullDescSize (const ASTContext &ASTCtx, const Descriptor *Desc) |
| static unsigned | computePointerOffset (const ASTContext &ASTCtx, const Pointer &Ptr) |
Compute the byte offset of Ptr in the full declaration. | |
| static bool | pointsToLastObject (const Pointer &Ptr) |
| Does Ptr point to the last subobject? | |
| static bool | isUserWritingOffTheEnd (const ASTContext &Ctx, const Pointer &Ptr, bool InvalidBase) |
| Does Ptr point to the last object AND to a flexible array member? | |
| UnsignedOrNone | evaluateBuiltinObjectSize (const ASTContext &ASTCtx, unsigned Kind, Pointer &Ptr) |
| static bool | interp__builtin_object_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| 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_x86_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_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_select (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]". | |
| static bool | interp__builtin_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_x86_extract_vector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_x86_extract_vector_masked (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_x86_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_vec_ext (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_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) |
| 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 (Pointer &Dest) |
| static bool | copyComposite (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest, bool Activate) |
| static bool | copyRecord (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest, bool Activate=false) |
| bool | DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest) |
| 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) |
| template<typename T> | |
| static 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. | |
| 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) |
| 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) |
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 34 of file Descriptor.h.
Invoked when a block is destroyed.
Invokes the destructors of all non-trivial nested fields of arrays and records.
Definition at line 40 of file Descriptor.h.
| using clang::interp::CompareFn = llvm::function_ref<bool(ComparisonCategoryResult)> |
| using clang::interp::DeclTy = llvm::PointerUnion<const Decl *, const Expr *> |
Definition at line 29 of file Descriptor.h.
| using clang::interp::FixedPointSemantics = llvm::FixedPointSemantics |
Definition at line 66 of file Function.h.
| using clang::interp::InterpFn = bool (*)(InterpState &, CodePtr &PC) PRESERVE_NONE |
Definition at line 2583 of file Interp.cpp.
| using clang::interp::SourceMap = std::vector<std::pair<unsigned, SourceInfo>> |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Reinterpret | |
| ReinterpretLike | |
| Volatile | |
| Dynamic | |
Definition at line 104 of file PrimType.h.
|
strong |
| Enumerator | |
|---|---|
| Little | |
| Big | |
Definition at line 19 of file BitcastBuffer.h.
|
strong |
| Enumerator | |
|---|---|
| Initialized | |
| NoInitializer | |
| InitializerFailed | |
Definition at line 43 of file Descriptor.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Started | |
| Ended | |
Definition at line 55 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 | |
Definition at line 33 of file PrimType.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Block | |
| FullExpression | |
| Call | |
Definition at line 107 of file Compiler.h.
|
strong |
|
strong |
|
inlinestatic |
Definition at line 699 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocFloat(), clang::interp::Floating::copy(), and New.
Referenced by interp__builtin_elementwise_abs(), and interp__builtin_fabs().
|
inlinestatic |
Definition at line 2085 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
Referenced by copyComposite(), copyRecord(), clang::interp::Compiler< Emitter >::visitCallArgs(), and clang::interp::Compiler< Emitter >::visitInitList().
|
inlinestatic |
Definition at line 2092 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::atField(), clang::interp::Pointer::canBeInitialized(), 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 343 of file Interp.h.
References AddSubMulHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 351 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 2445 of file Interp.h.
References OffsetHelper(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::AddSubMulHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| unsigned | Bits, | ||
| const T & | LHS, | ||
| const T & | RHS ) |
Definition at line 298 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(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, and clang::interp::InterpState::Stk.
Aligns a size to the pointer alignment.
Definition at line 191 of file PrimType.h.
Referenced by aligned(), BCP(), CallPtr(), CheckNonNullArgs(), clang::interp::ByteCodeEmitter::createLocal(), 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::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 198 of file PrimType.h.
References aligned().
Definition at line 195 of file PrimType.h.
References align().
Referenced by aligned(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), emitSerialized(), clang::interp::InterpStack::peek(), and clang::interp::CodePtr::read().
|
inline |
Definition at line 3568 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 3622 of file Interp.h.
References clang::interp::DynamicAllocator::allocate(), clang::interp::DynamicAllocator::Array, CheckArraySize(), CheckDynamicMemoryAllocation(), clang::interp::InterpState::EvalID, clang::interp::InterpState::getAllocator(), clang::interp::Descriptor::getSize(), Pointer, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), SizeT, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3583 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, and clang::interp::InterpState::Stk.
|
static |
Definition at line 2519 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 2270 of file Interp.cpp.
References clang::interp::Pointer::atIndex(), clang::interp::Pointer::elemSize(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::getRawAddress(), and clang::interp::Pointer::isOnePastEnd().
Referenced by CmpHelperEQ< Pointer >().
|
inline |
Just takes a pointer and checks if it's an incomplete array type.
Definition at line 3286 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckRange(), clang::CSK_ArrayToPointer, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isRoot(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::Pointer::isZero(), clang::interp::Pointer::isZeroSizeArray(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3237 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getPrimType(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3249 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getPrimType(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3176 of file Interp.h.
References CheckArray(), clang::interp::Descriptor::isArray(), OffsetHelper(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3207 of file Interp.h.
References CheckArray(), clang::interp::Descriptor::isArray(), OffsetHelper(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 127 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::deref(), INT_TYPE_SWITCH_NO_BOOL, PT_IntAP, and PT_IntAPS.
Referenced by interp__builtin_carryop(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_overflowop(), and interp__builtin_x86_pack().
|
inline |
Definition at line 3469 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 2634 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::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, and TYPE_SWITCH.
| bool clang::interp::BitAnd | ( | InterpState & | S, |
| CodePtr | OpPC ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS & RHS' on the stack
Definition at line 566 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3755 of file Interp.h.
References CheckLoad(), DoBitCastPtr(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3682 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, and clang::interp::InterpState::Stk.
| bool clang::interp::BitOr | ( | InterpState & | S, |
| CodePtr | OpPC ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS | RHS' on the stack
Definition at line 586 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::BitXor | ( | InterpState & | S, |
| CodePtr | OpPC ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS ^ RHS' on the stack
Definition at line 606 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::Call | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Function * | Func, | ||
| uint32_t | VarArgSize ) |
Definition at line 1641 of file Interp.cpp.
References clang::AK_MemberCall, clang::interp::InterpFrame::allocSize(), clang::interp::Pointer::block(), CheckActive(), CheckCallable(), CheckCallDepth(), checkConstructor(), CheckDestructor(), clang::interp::State::checkingPotentialConstantExpression(), CheckInvoke(), cleanup(), cleanupAfterFunctionCall(), compileFunction(), clang::interp::InterpState::Current, clang::interp::InterpFrame::free(), clang::Func, clang::interp::InterpFrame::getFunction(), clang::interp::State::getLangOpts(), clang::interp::InterpState::InitializingBlocks, Interpret(), clang::Invalid, clang::interp::Pointer::isDummy(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::Pointer::isZero(), clang::interp::InterpStack::peek(), primSize(), PT_Ptr, clang::interp::InterpState::Stk, and clang::Success.
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_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_gfni_mul(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_pternlog(), 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_vpconflict(), 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_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_select(), interp__builtin_select_scalar(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vec_ext(), interp__builtin_vec_set(), interp__builtin_vector_reduce(), interp__builtin_x86_extract_vector(), interp__builtin_x86_extract_vector_masked(), interp__builtin_x86_insert_subvector(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_builtin_ia32_gfni_affine(), interp_floating_comparison(), and InterpretBuiltin().
| bool clang::interp::CallBI | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const CallExpr * | CE, | ||
| uint32_t | BuiltinID ) |
Definition at line 1847 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 1858 of file Interp.cpp.
References align(), clang::interp::Pointer::asFunctionPointer(), Call, CallVirt(), CheckCallable(), CheckNonNullArgs(), clang::interp::Context::classify(), compileFunction(), clang::interp::InterpState::Ctx, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::FunctionPointer::Func, 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::hasNonNullAttr(), clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec(), clang::Invalid, clang::interp::Function::isFullyCompiled(), clang::interp::Pointer::isFunctionPointer(), clang::Type::isPointerType(), clang::interp::Function::isThisPointerExplicit(), clang::interp::Function::isVirtual(), clang::interp::Pointer::isZero(), 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 1591 of file Interp.cpp.
References clang::interp::InterpFrame::allocSize(), CheckCallable(), CheckCallDepth(), clang::interp::State::checkingPotentialConstantExpression(), CheckInvoke(), compileFunction(), clang::interp::InterpState::Current, clang::interp::InterpFrame::free(), clang::Func, clang::interp::InterpFrame::getFunction(), Interpret(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::InterpStack::peek(), primSize(), PT_Ptr, and clang::interp::InterpState::Stk.
| bool clang::interp::CallVirt | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Function * | Func, | ||
| uint32_t | VarArgSize ) |
Definition at line 1761 of file Interp.cpp.
References clang::interp::Pointer::block(), Call, clang::cast(), clang::interp::State::CCEDiag(), clang::interp::Context::collectBaseOffset(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::Func, clang::Type::getAsCXXRecordDecl(), clang::Type::getAsRecordDecl(), 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::interp::InterpState::InitializingBlocks, clang::CXXRecordDecl::isDerivedFrom(), 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 2588 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastAP | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be.
Definition at line 2624 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastAPS | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
Definition at line 2636 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 2487 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 2606 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 2786 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 2796 of file Interp.h.
References handleOverflow(), Int, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2770 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 2663 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, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2693 of file Interp.h.
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::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2715 of file Interp.h.
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::pop(), clang::interp::InterpStack::push(), clang::Result, 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 2597 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 2754 of file Interp.h.
References clang::interp::FixedPoint::from(), handleFixedPointOverflow(), Int, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastIntegralFloating | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const llvm::fltSemantics * | Sem, | ||
| uint32_t | FPOI ) |
Definition at line 2648 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::interp::Floating::fromIntegral(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastMemberPtrBasePop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| int32_t | Off, | ||
| const RecordDecl * | BaseDecl ) |
DerivedToBaseMemberPointer.
Definition at line 2537 of file Interp.cpp.
References appendToMemberPointer(), castBackMemberPointer(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastMemberPtrDerivedPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| int32_t | Off, | ||
| const RecordDecl * | BaseDecl ) |
BaseToDerivedMemberPointer.
Definition at line 2549 of file Interp.cpp.
References appendToMemberPointer(), castBackMemberPointer(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2317 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 2743 of file Interp.h.
References CheckPointerToIntegralCast(), clang::interp::Pointer::getIntegerRepresentation(), clang::Invalid, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::CastPointerIntegralAP | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
| bool clang::interp::CastPointerIntegralAPS | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | BitWidth ) |
| bool clang::interp::CheckActive | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK, | ||
| bool | WillActivate ) |
Definition at line 294 of file Interp.cpp.
References clang::C, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Pointer::getBase(), clang::interp::Pointer::getRecord(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::inUnion(), clang::interp::Pointer::isActive(), and clang::interp::Pointer::isRoot().
Referenced by Call(), CheckDestructor(), CheckFinalLoad(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
|
inlinestatic |
Definition at line 3665 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 394 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), and clang::interp::Pointer::isUnknownSizeArray().
Referenced by ArrayElemPtr(), ArrayElemPtrPop(), getField(), InitBitField(), InitBitFieldActivate(), InitField(), InitFieldActivate(), interp__builtin_strlen(), and OffsetHelper().
|
static |
Definition at line 32 of file EvaluationResult.cpp.
References clang::interp::Pointer::allElementsInitialized(), clang::interp::Pointer::atIndex(), clang::interp::Context::canClassify(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::InterpState::getContext(), clang::ArrayType::getElementType(), clang::interp::Pointer::getElemRecord(), clang::interp::Pointer::getField(), clang::ConstantArrayType::getZExtSize(), clang::interp::Pointer::isElementInitialized(), clang::Type::isRecordType(), clang::interp::Pointer::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 105 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::interp::Descriptor::MaxArrayElemBytes, and SizeT.
|
inline |
Definition at line 79 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
Referenced by AllocCN(), AllocN(), and interp__builtin_operator_new().
| bool clang::interp::CheckBCPResult | ( | InterpState & | S, |
| const Pointer & | Ptr ) |
Definition at line 274 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getType(), clang::isa(), clang::Type::isAnyComplexType(), clang::interp::Pointer::isDummy(), clang::interp::Pointer::isFunctionPointer(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Pointer::isTypeidPointer(), and clang::interp::Pointer::isZero().
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
| bool clang::interp::CheckBitCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | HasIndeterminateBits, | ||
| bool | TargetIsUCharOrByte ) |
Definition at line 2194 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 1536 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 990 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Definition, diagnoseCallableDecl(), clang::FunctionDecl::getBody(), clang::interp::Function::getDecl(), clang::interp::InterpFrame::getDepth(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), clang::Decl::hasAttr(), clang::interp::Function::hasBody(), clang::FunctionDecl::isConstexpr(), clang::interp::Function::isConstexpr(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::Function::isValid(), clang::interp::Function::isVirtual(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Definition at line 1021 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getDepth(), 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 561 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), clang::interp::InterpState::InitializingBlocks, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isConst(), clang::interp::Pointer::isConstInMutable(), clang::interp::Pointer::isLive(), and clang::interp::Pointer::isMutable().
Referenced by 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 ) |
Checks if the Descriptor is of a constexpr or const global variable.
Definition at line 437 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::State::CCEDiag(), 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(), and clang::interp::State::Note().
Referenced by CheckConstant(), CheckFinalLoad(), CheckGlobalLoad(), and CheckLoad().
|
static |
Definition at line 489 of file Interp.cpp.
References CheckConstant(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getDeclID(), clang::interp::Pointer::isBlockPointer(), and clang::interp::Pointer::isStatic().
|
static |
Definition at line 1480 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::InterpFrame::getLocation(), and clang::interp::Record::getNumVirtualBases().
Referenced by Call().
|
inline |
Definition at line 3549 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 1151 of file Interp.cpp.
References diagnoseUnknownDecl(), and clang::DeclRefExpr::getDecl().
Referenced by InvalidDeclRef().
| bool clang::interp::CheckDeleteSource | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Expr * | Source, | ||
| const Pointer & | Ptr ) |
Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.
Definition at line 1123 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Pointer::getDeclLoc(), getIdentifier(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isTemporary(), clang::interp::State::Note(), and clang::interp::Pointer::toDiagnosticString().
Referenced by Free().
|
inline |
Definition at line 3774 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 1501 of file Interp.cpp.
References clang::AK_Destroy, clang::interp::Pointer::block(), CheckActive(), CheckLifetime(), CheckLive(), CheckRange(), CheckTemporary(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Pointer::getLifetime(), clang::interp::InterpFrame::getSource(), and clang::interp::Block::isStatic().
Referenced by Call(), and CheckDestruction().
| 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 197 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(), and clang::Expr::getType().
| bool clang::interp::CheckDowncast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| uint32_t | Offset ) |
Checks if the dowcast using the given offset is possible with the given pointer.
Definition at line 541 of file Interp.cpp.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getDeclPtr(), clang::interp::InterpFrame::getExpr(), clang::interp::Descriptor::getMetadataSize(), clang::Type::getPointeeType(), and clang::interp::Pointer::getType().
Referenced by GetPtrDerivedPop().
| bool clang::interp::CheckDummy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Block * | B, | ||
| AccessKinds | AK ) |
Checks if a pointer is a dummy pointer.
Definition at line 1171 of file Interp.cpp.
References clang::AK_Decrement, clang::AK_Destroy, clang::AK_Increment, clang::AK_Read, clang::interp::Descriptor::asValueDecl(), clang::interp::InterpState::Current, diagnoseUnknownDecl(), clang::interp::State::FFDiag(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), and clang::interp::Block::isDummy().
Referenced by CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), CheckNewTypeMismatch(), CheckStore(), EndLifetime(), EndLifetimePop(), interp__builtin_is_within_lifetime(), interp__builtin_strlen(), and StartLifetime().
| bool clang::interp::CheckDynamicMemoryAllocation | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks if dynamic memory allocation is available in the current language mode.
Definition at line 1096 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 3512 of file Interp.h.
References diagnoseEnumValue(), clang::interp::InterpState::inConstantContext(), clang::EnumDecl::isFixed(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::CheckExtern | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if the variable has externally defined storage.
Definition at line 376 of file Interp.cpp.
References clang::interp::Descriptor::asValueDecl(), clang::interp::Descriptor::asVarDecl(), clang::interp::State::checkingPotentialConstantExpression(), diagnoseNonConstVariable(), clang::interp::InterpState::EvaluatingDecl, clang::interp::Pointer::getDeclDesc(), clang::interp::State::getLangOpts(), clang::interp::Pointer::isConst(), clang::interp::Pointer::isExtern(), clang::interp::Pointer::isInitialized(), and clang::interp::Pointer::isPastEnd().
Referenced by CheckFinalLoad(), CheckGlobalLoad(), CheckInvoke(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
|
static |
Definition at line 76 of file EvaluationResult.cpp.
References clang::interp::Pointer::atField(), clang::cast(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::State::FFDiag(), clang::Type::getAsArrayTypeUnsafe(), clang::interp::Pointer::getDeclDesc(), clang::interp::Descriptor::getLocation(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::isActive(), clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::interp::Pointer::isInitialized(), clang::Type::isRecordType(), 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 826 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::block(), CheckActive(), CheckConstant(), CheckDummy(), CheckExtern(), CheckLifetime(), CheckLive(), CheckMutable(), CheckTemporary(), CheckWeak(), DiagnoseUninitialized(), clang::interp::Pointer::getLifetime(), clang::interp::Block::isAccessible(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isConstexprUnknown(), clang::interp::Pointer::isInitialized(), and clang::interp::Pointer::isZero().
| 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.
Definition at line 1049 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::LangOptionsBase::FPE_Ignore, clang::FPOptions::getExceptionMode(), clang::interp::InterpFrame::getRange(), clang::FPOptions::getRoundingMode(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::inConstantContext(), clang::interp::State::noteUndefinedBehavior(), and clang::Result.
Referenced by Addf(), CastFloatingIntegral(), CastFloatingIntegralAP(), CastFloatingIntegralAPS(), CastIntegralFloating(), Divf(), IncDecFloatHelper(), Mulf(), and Subf().
| 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 1521 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Definition, diagnoseCallableDecl(), clang::FunctionDecl::getBody(), clang::interp::InterpFrame::getDepth(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
| 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 723 of file Interp.cpp.
References clang::AK_Read, clang::interp::Descriptor::asValueDecl(), CheckConstant(), CheckDummy(), 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, clang::interp::State::Note(), and Pointer.
Referenced by GetGlobal().
| bool clang::interp::CheckInit | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if a value can be initialized.
Definition at line 900 of file Interp.cpp.
References clang::AK_Assign, CheckLive(), and CheckRange().
|
static |
Definition at line 888 of file Interp.cpp.
References clang::AK_MemberCall, CheckExtern(), CheckLive(), CheckRange(), isConstexprUnknown(), and clang::interp::Pointer::isDummy().
|
static |
Definition at line 694 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(), and Started.
Referenced by CheckDestructor(), CheckFinalLoad(), CheckLoad(), CheckLocalLoad(), CheckNewTypeMismatch(), and CheckStore().
| bool clang::interp::CheckLiteralType | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | T ) |
Definition at line 1395 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(), and clang::interp::Function::isConstructor().
| bool clang::interp::CheckLive | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Checks if a pointer is live and accessible.
Definition at line 402 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::CSK_Field, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Pointer::getDeclLoc(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isDynamic(), clang::interp::Pointer::isField(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isTemporary(), clang::interp::Pointer::isZero(), and clang::interp::State::Note().
Referenced by CheckDestructor(), CheckFinalLoad(), CheckInit(), CheckInvoke(), CheckLoad(), 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 777 of file Interp.cpp.
References clang::interp::Pointer::block(), CheckActive(), CheckConstant(), CheckDummy(), CheckExtern(), CheckLifetime(), CheckLive(), CheckMutable(), CheckRange(), CheckTemporary(), CheckVolatile(), CheckWeak(), clang::CSK_Field, clang::interp::InterpState::Current, DiagnoseUninitialized(), clang::interp::State::FFDiag(), clang::interp::Pointer::getLifetime(), clang::interp::InterpFrame::getSource(), clang::interp::Block::isAccessible(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Pointer::isField(), clang::interp::Pointer::isInitialized(), and clang::interp::Pointer::isZero().
Referenced by ArrayElem(), ArrayElemPop(), BitCast(), BitCastPrim(), 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_memchr(), interp__builtin_memcmp(), interp__builtin_nan(), Load(), LoadPop(), Memcpy(), PreDec(), PreDecBitfield(), PreInc(), and PreIncBitfield().
| bool clang::interp::CheckLocalLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Block * | B ) |
Definition at line 755 of file Interp.cpp.
References clang::AK_Read, clang::interp::Descriptor::asValueDecl(), CheckLifetime(), clang::interp::InterpState::Current, DiagnoseUninitialized(), clang::interp::State::FFDiag(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::Decl::getLocation(), clang::interp::InterpFrame::getLocation(), clang::Invalid, clang::interp::Block::isExtern(), clang::interp::Descriptor::IsVolatile, clang::interp::State::Note(), and clang::interp::Block::rawData().
Referenced by GetLocal().
| bool clang::interp::CheckMutable | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if a pointer points to a mutable field.
Definition at line 583 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::block(), clang::interp::InterpState::Current, clang::interp::InterpState::EvalID, clang::interp::State::FFDiag(), clang::interp::Block::getEvalID(), clang::interp::Pointer::getField(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isMutable(), and clang::interp::State::Note().
Referenced by CheckFinalLoad(), CheckLoad(), 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 1105 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 1989 of file Interp.cpp.
References clang::interp::Pointer::activate(), clang::AK_Construct, clang::interp::Pointer::block(), clang::cast(), CheckActive(), CheckConst(), CheckDummy(), CheckExtern(), CheckGlobal(), CheckLifetime(), CheckLive(), CheckRange(), CheckTemporary(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Pointer::getBase(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getConstantArrayType(), clang::interp::Descriptor::getDataType(), clang::interp::Pointer::getFieldDesc(), clang::interp::InterpFrame::getLocation(), clang::interp::Pointer::getRecord(), clang::interp::InterpFrame::getSource(), clang::ASTContext::hasSimilarType(), clang::interp::InterpState::inConstantContext(), clang::interp::Pointer::inUnion(), InvalidNewDeleteExpr(), clang::interp::Block::isAccessible(), clang::interp::Pointer::isActive(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Record::isUnion(), clang::interp::Pointer::isZero(), 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 3675 of file Interp.h.
References CheckNewTypeMismatch(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3497 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocation(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1189 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 497 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), and clang::interp::Pointer::isZero().
Referenced by GetField(), getField(), GetFieldPop(), GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), GetPtrVirtBasePop(), IncDecPtrHelper(), OffsetHelper(), and SetField().
| bool clang::interp::CheckPointerToIntegralCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| unsigned | BitWidth ) |
Definition at line 2148 of file Interp.cpp.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::Default, clang::interp::State::getASTContext(), clang::interp::State::getLangOpts(), clang::TargetInfo::getPointerWidth(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::ASTContext::getTargetInfo(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Pointer::isFunctionPointer(), and clang::interp::Pointer::isZero().
Referenced by CastPointerIntegral(), CastPointerIntegralAP(), and CastPointerIntegralAPS().
|
inline |
Definition at line 3462 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), and clang::interp::InterpFrame::getSource().
| bool clang::interp::CheckRange | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Checks if a pointer is in range.
Definition at line 508 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isOnePastEnd(), and clang::interp::Pointer::isZeroSizeArray().
Referenced by ArrayDecay(), CheckDestructor(), CheckInit(), CheckInvoke(), CheckLoad(), CheckNewTypeMismatch(), CheckStore(), GetField(), getField(), GetFieldPop(), InitBitField(), InitBitFieldActivate(), InitField(), InitFieldActivate(), interp__builtin_nan(), interp__builtin_strcmp(), interp__builtin_strlen(), and SetField().
| 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 520 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isElementPastEnd(), and clang::interp::Pointer::isZeroSizeArray().
| 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 150 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::Expr::getType(), Left, LT(), and clang::interp::State::noteUndefinedBehavior().
Referenced by DoShift(), and DoShiftAP().
| bool clang::interp::CheckStore | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| bool | WillBeActivated ) |
Checks if a value can be stored in a block.
Definition at line 859 of file Interp.cpp.
References clang::AK_Assign, clang::interp::Pointer::block(), CheckActive(), CheckConst(), CheckDummy(), CheckExtern(), CheckGlobal(), CheckLifetime(), CheckLive(), CheckRange(), CheckVolatile(), clang::interp::Pointer::getLifetime(), clang::interp::InterpState::inConstantContext(), clang::interp::Block::isAccessible(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), and clang::interp::Pointer::isZero().
Referenced by SetField(), SetThisField(), Store(), StoreActivate(), StoreActivatePop(), StoreBitField(), StoreBitFieldActivate(), StoreBitFieldActivatePop(), StoreBitFieldPop(), and StorePop().
| 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 530 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), and clang::interp::Pointer::isOnePastEnd().
Referenced by getField(), GetPtrBase(), GetPtrBasePop(), and GetPtrDerivedPop().
| bool clang::interp::CheckThis | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks the 'this' pointer.
Definition at line 1032 of file Interp.cpp.
References clang::interp::InterpState::Current, 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(), SetThisField(), and This().
|
static |
Definition at line 600 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), clang::interp::Descriptor::asValueDecl(), clang::interp::Pointer::block(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Pointer::getBase(), clang::interp::Pointer::getField(), clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getLocation(), clang::interp::Pointer::getType(), clang::interp::InterpState::InitializingBlocks, clang::Invalid, clang::interp::Pointer::isLive(), clang::interp::Pointer::isRoot(), clang::interp::Pointer::isVolatile(), clang::QualType::isVolatileQualified(), and clang::interp::State::Note().
Referenced by CheckLoad(), and CheckStore().
|
static |
Definition at line 706 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, |
| CodePtr | OpPC, | ||
| const Function * | Func ) |
Definition at line 220 of file Interp.cpp.
References clang::interp::InterpFrame::Caller, clang::interp::InterpState::Current, clang::interp::InterpStack::discard(), clang::Func, clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getRetPC(), clang::isa(), popArg(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
| bool clang::interp::CMP3 | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const ComparisonCategoryInfo * | CmpInfo ) |
Definition at line 1304 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getSource(), clang::ComparisonCategoryInfo::getValueInfo(), clang::ComparisonCategoryInfo::makeWeakResult(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), SetThreeWayComparisonField(), clang::interp::InterpState::Stk, and clang::Unordered.
| bool clang::interp::CmpHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| CompareFn | Fn ) |
Definition at line 1074 of file Interp.h.
References Fn, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by CmpHelperEQ(), GE(), GT(), LE(), and LT().
|
inline |
Definition at line 1091 of file Interp.h.
References clang::interp::State::CCEDiag(), Compare(), clang::interp::Pointer::computeSplitPoint(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), Fn, clang::Decl::getAccess(), clang::interp::State::getASTContext(), clang::interp::Pointer::getByteOffset(), clang::FieldDecl::getParent(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::hasSameBase(), 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 1255 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 1145 of file Interp.h.
References arePotentiallyOverlappingStringLiterals(), clang::interp::Descriptor::asExpr(), Compare(), clang::interp::Pointer::computeOffsetForComparison(), clang::interp::InterpState::Current, clang::Equal, clang::interp::State::FFDiag(), Fn, clang::interp::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIntegerRepresentation(), clang::interp::Pointer::getOffset(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::hasSameBase(), clang::interp::InterpState::inConstantContext(), clang::isa(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Pointer::isFunctionPointer(), clang::interp::Pointer::isOnePastEnd(), IsOpaqueConstantCall(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::Pointer::isZero(), clang::interp::Pointer::pointsToStringLiteral(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, clang::interp::Pointer::toDiagnosticString(), and clang::Unordered.
|
static |
Definition at line 169 of file EvaluationResult.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Pointer::block(), collectBlocks(), clang::interp::Pointer::deref(), clang::interp::Pointer::elem(), clang::interp::Descriptor::ElemDesc, clang::interp::Descriptor::ElemRecord, clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Descriptor::isCompositeArray(), isOrHasPtr(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Pointer::narrow(), and PT_Ptr.
Referenced by clang::interp::EvaluationResult::checkReturnValue(), 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, |
| CodePtr | OpPC ) |
1) Pops the value from the stack.
2) Pushes the bitwise complemented value on the stack (~V).
Definition at line 1053 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| ComparisonCategoryResult clang::interp::Compare | ( | const T & | X, |
| const T & | Y ) |
Helper to compare two comparable types.
Definition at line 25 of file Primitives.h.
References clang::Equal, clang::Greater, clang::Less, and X.
Referenced by CmpHelper< Pointer >(), CmpHelperEQ< Pointer >(), clang::interp::Boolean::compare(), clang::interp::Integral< Bits, false >::compare(), and DoShift().
|
static |
Definition at line 1582 of file Interp.cpp.
References clang::Definition, clang::Func, clang::interp::InterpState::getContext(), and clang::interp::InterpState::P.
|
static |
Definition at line 2206 of file InterpBuiltin.cpp.
References computeFullDescSize(), clang::interp::Descriptor::ElemRecord, clang::ASTContext::getCanonicalTagType(), clang::interp::Record::getDecl(), clang::interp::Descriptor::getElemQualType(), clang::interp::Descriptor::getNumElems(), clang::CharUnits::getQuantity(), clang::interp::Descriptor::getType(), clang::ASTContext::getTypeSizeInChars(), clang::interp::Descriptor::isArray(), clang::interp::Descriptor::isPrimitive(), and clang::interp::Descriptor::isRecord().
Referenced by computeFullDescSize(), and evaluateBuiltinObjectSize().
|
static |
Compute the byte offset of Ptr in the full declaration.
Definition at line 2226 of file InterpBuiltin.cpp.
References clang::interp::Descriptor::asDecl(), clang::cast(), computePointerOffset(), clang::interp::Pointer::expand(), clang::interp::Pointer::getArray(), clang::ASTContext::getASTRecordLayout(), clang::interp::Pointer::getBase(), clang::ASTRecordLayout::getBaseClassOffset(), clang::interp::Record::getDecl(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getField(), clang::interp::Pointer::getFieldDesc(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::FieldDecl::getParent(), clang::CharUnits::getQuantity(), clang::interp::Pointer::getRecord(), clang::ASTContext::getTypeSizeInChars(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isBaseClass(), clang::interp::Pointer::isField(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isVirtualBaseClass(), clang::Result, and clang::ASTContext::toCharUnitsFromBits().
Referenced by computePointerOffset(), and evaluateBuiltinObjectSize().
| bool clang::interp::Const | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const T & | Arg ) |
Definition at line 1401 of file Interp.h.
References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1412 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 172 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 190 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 3261 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeElement(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 6244 of file InterpBuiltin.cpp.
References Activate(), clang::interp::Pointer::atIndex(), copyComposite(), copyRecord(), clang::interp::Pointer::deref(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initialize(), clang::Invalid, clang::interp::Descriptor::isCompositeArray(), clang::interp::Pointer::isLive(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::narrow(), and TYPE_SWITCH.
Referenced by copyComposite(), copyRecord(), and DoMemcpy().
|
static |
Definition at line 2345 of file Interp.cpp.
References clang::interp::Pointer::deref(), clang::interp::MemberPointer::getPathLength(), needsAlloc(), and clang::interp::InterpState::P.
|
static |
Definition at line 2315 of file Interp.cpp.
References clang::interp::Pointer::deref(), clang::interp::MemberPointer::getPathLength(), clang::interp::InterpState::P, PT_Float, PT_IntAP, PT_IntAPS, and PT_MemberPtr.
Referenced by finishGlobalRecurse().
|
static |
Definition at line 6191 of file InterpBuiltin.cpp.
References Activate(), clang::interp::Pointer::activate(), clang::interp::Pointer::atField(), CheckMutable(), clang::interp::Context::classify(), copyComposite(), copyRecord(), clang::interp::InterpState::Ctx, clang::interp::Pointer::deref(), clang::interp::Descriptor::ElemRecord, clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::initialize(), clang::interp::Pointer::isActive(), clang::interp::Pointer::isInitialized(), clang::interp::Descriptor::isRecord(), 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 3435 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 917 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 3525 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 928 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1030 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1040 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 944 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 955 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2505 of file Interp.h.
References clang::AK_Decrement, DiagnoseUninitialized(), IncDecPtrHelper(), clang::interp::Pointer::isInitialized(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Destroy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 2457 of file Interp.cpp.
References clang::interp::Descriptor::asDecl(), clang::cast(), clang::interp::InterpState::Current, clang::interp::InterpFrame::destroy(), Ended, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Pointer::getDeclDesc(), clang::interp::InterpFrame::getFunction(), clang::interp::Pointer::getLifetime(), clang::interp::InterpFrame::getLocalBlock(), clang::interp::InterpFrame::getLocalPointer(), clang::interp::Descriptor::getLocation(), clang::interp::Function::getScope(), clang::interp::Block::isInitialized(), clang::interp::Scope::locals_reverse(), and clang::interp::Pointer::toDiagnosticString().
|
static |
Definition at line 908 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::FunctionDecl::getDefinition(), 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 CheckCallable(), and CheckFunctionDecl().
| void clang::interp::diagnoseEnumValue | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const EnumDecl * | ED, | ||
| const APSInt & | Value ) |
Definition at line 1374 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 158 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().
| bool clang::interp::DiagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | Extern, | ||
| const Descriptor * | Desc, | ||
| AccessKinds | AK ) |
Definition at line 654 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::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), and clang::interp::State::Note().
| bool clang::interp::DiagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Definition at line 647 of file Interp.cpp.
References DiagnoseUninitialized(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::isExtern(), clang::interp::Pointer::isInitialized(), and clang::interp::Pointer::isLive().
Referenced by CheckFinalLoad(), CheckGlobalLoad(), CheckLoad(), CheckLocalLoad(), DecPtr(), DiagnoseUninitialized(), GetGlobalUnchecked(), and IncPtr().
|
static |
Definition at line 20 of file EvaluationResult.cpp.
References clang::interp::State::FFDiag(), clang::Decl::getLocation(), and clang::interp::State::Note().
Referenced by CheckArrayInitialized(), and CheckFieldsInitialized().
| bool clang::interp::DiagTypeid | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2262 of file Interp.cpp.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::getExpr().
|
static |
Definition at line 47 of file InterpBuiltin.cpp.
References clang::interp::InterpStack::discard(), and TYPE_SWITCH.
Referenced by interp__builtin_expect(), interp__builtin_infer_alloc_token(), 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 650 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckDivRem(), handleFixedPointOverflow(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 473 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, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 676 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 326 of file InterpBuiltinBitCast.cpp.
References Big, CheckBitcastType(), clang::interp::BitcastBuffer::copyBits(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getDataType(), clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getTargetInfo(), clang::interp::Pointer::isBlockPointer(), clang::interp::Bits::isFullByte(), clang::TargetInfo::isLittleEndian(), clang::interp::Pointer::isLive(), 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 359 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 367 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::Pointer::deref(), enumeratePointerFields(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getDataType(), clang::interp::InterpFrame::getExpr(), clang::interp::Pointer::getField(), clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::Bits::getQuantity(), clang::Stmt::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::if(), clang::interp::Pointer::initialize(), Initialized, clang::FieldDecl::isBitField(), clang::interp::Pointer::isBlockPointer(), clang::TargetInfo::isLittleEndian(), clang::interp::Pointer::isLive(), Little, PT_Bool, PT_IntAP, PT_IntAPS, clang::interp::BitcastBuffer::rangeInitialized(), readPointerToBuffer(), clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), clang::Success, and swapBytes().
| bool clang::interp::DoMemcpy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Src, | ||
| Pointer & | Dest ) |
Copy the contents of Src into Dest.
Definition at line 6284 of file InterpBuiltin.cpp.
References copyComposite(), DoMemcpy(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isBlockPointer(), and clang::interp::Descriptor::isPrimitive().
Referenced by DoMemcpy(), interp__builtin_memcpy(), and Memcpy().
| bool clang::interp::DoMemcpy | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | SrcPtr, | ||
| const Pointer & | DestPtr, | ||
| Bits | Size ) |
Definition at line 485 of file InterpBuiltinBitCast.cpp.
References enumeratePointerFields(), clang::interp::InterpState::getContext(), and clang::interp::Pointer::isBlockPointer().
|
inline |
Definition at line 2940 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 3022 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 1988 of file Interp.h.
References clang::interp::InterpStack::dump(), and clang::interp::InterpState::Stk.
| bool clang::interp::Dup | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1370 of file Interp.h.
References clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2572 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::enableLocal(), and clang::interp::InterpFrame::isLocalEnabled().
| bool clang::interp::EndLifetime | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the peek'd pointer.
Definition at line 1970 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), endLifetimeRecurse(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::EndLifetimePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the pop'd pointer.
Definition at line 1980 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), endLifetimeRecurse(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1949 of file Interp.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Pointer::endLifetime(), endLifetimeRecurse(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getLifetime(), clang::interp::Pointer::getRecord(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Pointer::narrow(), and Started.
Referenced by EndLifetime(), EndLifetimePop(), and endLifetimeRecurse().
|
inline |
Definition at line 3394 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 1297 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
|
inline |
Do nothing and just abort execution.
Definition at line 3425 of file Interp.h.
Referenced by interp__builtin_is_within_lifetime().
|
static |
Definition at line 3493 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 ) |
Definition at line 2328 of file InterpBuiltin.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::Pointer::atIndex(), computeFullDescSize(), computePointerOffset(), evaluateBuiltinObjectSize(), clang::interp::Pointer::expand(), clang::interp::Pointer::getBase(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getType(), clang::interp::Pointer::getType(), clang::ValueDecl::getType(), clang::interp::Pointer::inArray(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isBaseClass(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::Type::isPointerType(), isUserWritingOffTheEnd(), clang::interp::Pointer::isZero(), clang::interp::Pointer::narrow(), and clang::interp::Pointer::stripBaseCasts().
Referenced by evaluateBuiltinObjectSize(), interp__builtin_object_size(), and clang::interp::Context::tryEvaluateObjectSize().
|
inline |
Definition at line 3158 of file Interp.h.
References clang::interp::Pointer::expand(), clang::interp::Pointer::isBlockPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 2362 of file Interp.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), copyPrimitiveMemory(), clang::interp::Pointer::deref(), finishGlobalRecurse(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getRecord(), clang::interp::Descriptor::isArray(), clang::interp::Pointer::narrow(), needsAlloc(), and TYPE_SWITCH_ALLOC.
Referenced by finishGlobalRecurse(), and FinishInitGlobal().
|
inline |
Definition at line 1961 of file Interp.h.
References clang::interp::Pointer::canBeInitialized(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1968 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1977 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::FinishInitGlobal | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2410 of file Interp.cpp.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), finishGlobalRecurse(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1954 of file Interp.h.
References clang::interp::Pointer::canBeInitialized(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Flip | ( | InterpState & | S, |
| CodePtr | OpPC ) |
[Value1, Value2] -> [Value2, Value1]
Definition at line 1383 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2809 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 1276 of file Interp.cpp.
References clang::interp::DynamicAllocator::Array, clang::interp::Descriptor::asExpr(), clang::interp::Pointer::block(), 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::Pointer::getDeclDesc(), clang::interp::Block::getDescriptor(), clang::interp::Pointer::getIndex(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), getVirtualOperatorDelete(), hasVirtualDestructor(), clang::isa(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isRoot(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::interp::Pointer::isZero(), clang::interp::Pointer::isZeroSizeArray(), clang::interp::DynamicAllocator::NonArray, clang::interp::InterpStack::pop(), RunDestructors(), clang::interp::InterpState::Stk, clang::interp::Pointer::stripBaseCasts(), and clang::interp::Pointer::toDiagnosticString().
| bool clang::interp::GE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1358 of file Interp.h.
References CmpHelper(), clang::Equal, and clang::Greater.
Definition at line 29 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 1732 of file Interp.cpp.
References clang::AK_MemberCall, clang::interp::Descriptor::asVarDecl(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::Type::getAsCXXRecordDecl(), clang::interp::State::getASTContext(), clang::interp::Pointer::getDeclDesc(), clang::interp::InterpFrame::getExpr(), clang::ASTContext::getLValueReferenceType(), clang::interp::Pointer::getType(), clang::interp::Pointer::isConst(), clang::VarDecl::isConstexpr(), clang::interp::Pointer::isStatic(), clang::interp::Pointer::stripBaseCasts(), clang::interp::Pointer::toAPValue(), and V.
Referenced by CallVirt().
Definition at line 144 of file InterpBuiltin.cpp.
References clang::Type::castAs(), clang::interp::Descriptor::getElemQualType(), clang::interp::Pointer::getFieldDesc(), getPointeeType(), clang::interp::Descriptor::getType(), clang::interp::Descriptor::isArray(), and clang::interp::Descriptor::isPrimitive().
Referenced by interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_test_op(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_strcmp(), and interp__builtin_x86_pack().
| 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 1463 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1427 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::asIntPointer(), clang::interp::Pointer::atField(), clang::interp::IntPointer::atOffset(), clang::interp::Pointer::block(), CheckArray(), CheckNull(), CheckRange(), CheckSubobject(), clang::CSK_Field, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getFieldDesc(), clang::interp::State::getLangOpts(), clang::interp::Block::getSize(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::inConstantContext(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Descriptor::isRecord(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::Pointer::toDiagnosticString().
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 1495 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3310 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 1538 of file Interp.h.
References CheckGlobalLoad(), clang::interp::Block::deref(), clang::interp::Program::getGlobal(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetGlobalUnchecked | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Same as GetGlobal, but without the checks.
Definition at line 1550 of file Interp.h.
References clang::AK_Read, clang::interp::Block::deref(), DiagnoseUninitialized(), clang::interp::Block::getBlockDesc(), clang::interp::Block::getDescriptor(), clang::interp::Program::getGlobal(), Initialized, clang::interp::Block::isExtern(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3317 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetLocal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1424 of file Interp.h.
References CheckLocalLoad(), clang::interp::InterpState::Current, clang::interp::Block::deref(), clang::interp::InterpFrame::getLocalBlock(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2578 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::isLocalEnabled(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3328 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3333 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3343 of file Interp.h.
References clang::cast(), clang::Func, clang::interp::InterpState::getContext(), clang::interp::Context::getOrCreateFunction(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetParam | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Index ) |
Definition at line 1446 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getParam(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1894 of file Interp.h.
References clang::interp::Pointer::asIntPointer(), clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), clang::CSK_Base, clang::interp::State::getASTContext(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Pointer::isIntegralPointer(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1918 of file Interp.h.
References clang::interp::Pointer::asIntPointer(), clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), clang::CSK_Base, clang::interp::State::getASTContext(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Pointer::isIntegralPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by CallVirt().
|
inline |
Definition at line 1860 of file Interp.h.
References clang::interp::Pointer::atFieldSub(), clang::interp::State::CCEDiag(), CheckDowncast(), CheckNull(), CheckSubobject(), clang::CSK_Derived, clang::interp::InterpState::Current, clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getCanonicalDecl(), clang::TagDecl::getCanonicalDecl(), clang::interp::Record::getDecl(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getRecord(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::getType(), clang::interp::Pointer::isBlockPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| 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 1470 of file Interp.cpp.
References getField(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetPtrFieldPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off ) |
Definition at line 1475 of file Interp.cpp.
References getField(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1840 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 1823 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 1833 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 1944 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
|
inline |
Definition at line 1850 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
|
inline |
Definition at line 2020 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 2011 of file Interp.h.
References CheckNull(), clang::CSK_Base, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and VirtBaseHelper().
|
inline |
Definition at line 1828 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::getLocalBlock(), and handleReference().
|
inlinestatic |
Definition at line 90 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(), clang::interp::Compiler< Emitter >::VisitCastExpr(), and clang::interp::Compiler< Emitter >::VisitConvertVectorExpr().
|
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 377 of file IntegralAP.h.
| bool clang::interp::GetThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1509 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckLoad(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
| bool clang::interp::GetTypeid | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | TypePtr, | ||
| const Type * | TypeInfoType ) |
Typeid support.
Definition at line 2230 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 2236 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::Func, clang::interp::Context::getASTContext(), clang::ASTContext::getCanonicalTagType(), clang::interp::InterpState::getContext(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GT | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1351 of file Interp.h.
References CmpHelper(), and clang::Greater.
| bool clang::interp::handleFixedPointOverflow | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const FixedPoint & | FP ) |
Definition at line 2127 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().
|
static |
Definition at line 73 of file InterpHelpers.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getType(), and clang::interp::State::noteUndefinedBehavior().
Referenced by AddSubMulHelper(), CastFixedPointIntegral(), CastFloatingIntegralAP(), CastFloatingIntegralAPS(), IncDecHelper(), interp__builtin_vector_reduce(), Neg(), and SubPtr().
| bool clang::interp::handleReference | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| Block * | B ) |
Definition at line 2211 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(), isConstexprUnknown(), PT_Ptr, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by GetRefLocal().
Definition at line 1269 of file Interp.cpp.
Referenced by Free().
| 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 837 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 849 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 990 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::interp::Floating::decrement(), clang::interp::Pointer::deref(), 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 762 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::interp::State::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), handleOverflow(), Inc, clang::interp::InterpState::inConstantContext(), clang::Invalid, isConstexprUnknown(), clang::interp::Pointer::isDummy(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, clang::interp::InterpState::Stk, and Yes.
Referenced by Dec(), DecBitfield(), DecPop(), DecPopBitfield(), Inc(), IncBitfield(), IncPop(), IncPopBitfield(), PreDec(), PreDecBitfield(), PreInc(), and PreIncBitfield().
|
inlinestatic |
Definition at line 2471 of file Interp.h.
References CheckNull(), clang::CSK_ArrayIndex, clang::interp::Pointer::deref(), clang::interp::Pointer::isDummy(), OffsetHelper(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1010 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1020 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 865 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 876 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2496 of file Interp.h.
References clang::AK_Increment, DiagnoseUninitialized(), IncDecPtrHelper(), clang::interp::Pointer::isInitialized(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Init | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2202 of file Interp.h.
References CheckInit(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
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(), and clang::interp::Compiler< Emitter >::visitVarDecl().
| bool clang::interp::InitBitField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1753 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::InitBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1786 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, needsAlloc(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.
| 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 2227 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(), and clang::interp::InterpState::Stk.
| bool clang::interp::InitElemPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Idx ) |
The same as InitElem, but pops the pointer as well.
Definition at line 2264 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(), and clang::interp::InterpState::Stk.
| 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 1716 of file Interp.h.
References clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::InitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1734 of file Interp.h.
References clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::InitGlobal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1568 of file Interp.h.
References clang::interp::Pointer::deref(), clang::interp::Program::getGlobal(), clang::interp::MemberPointer::getPathLength(), clang::interp::Pointer::initialize(), needsAlloc(), clang::interp::InterpState::P, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::InitGlobalTemp | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I, | ||
| const LifetimeExtendedTemporaryDecl * | Temp ) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that
Definition at line 1604 of file Interp.h.
References clang::interp::Descriptor::asExpr(), clang::ConstantFold, clang::interp::Pointer::deref(), clang::interp::State::EvalMode, clang::interp::Pointer::getDeclDesc(), clang::interp::Program::getGlobal(), clang::interp::Pointer::initialize(), clang::interp::InterpState::P, clang::interp::InterpStack::pop(), clang::interp::InterpState::SeenGlobalTemporaries, and clang::interp::InterpState::Stk.
|
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 1623 of file Interp.h.
References clang::interp::Descriptor::asExpr(), clang::ConstantFold, clang::interp::State::EvalMode, clang::interp::Pointer::getDeclDesc(), clang::interp::InterpStack::peek(), clang::interp::InterpState::SeenGlobalTemporaries, and clang::interp::InterpState::Stk.
| bool clang::interp::InitPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2213 of file Interp.h.
References CheckInit(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2567 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::initScope().
| bool clang::interp::InitThisBitField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1673 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
| bool clang::interp::InitThisBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1693 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
| bool clang::interp::InitThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1636 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
| bool clang::interp::InitThisFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1653 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
|
static |
Definition at line 722 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 807 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 1619 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 252 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
__builtin_assume_aligned(Ptr, Alignment[, ExtraOffset])
Definition at line 1301 of file InterpBuiltin.cpp.
References clang::CharUnits::alignTo(), clang::interp::Descriptor::asExpr(), clang::interp::Descriptor::asValueDecl(), Call(), clang::interp::State::CCEDiag(), clang::interp::Context::classify(), clang::interp::InterpState::Ctx, clang::CharUnits::fromQuantity(), GetAlignOfExpr(), clang::interp::State::getASTContext(), clang::ASTContext::getDeclAlign(), clang::interp::Pointer::getDeclDesc(), clang::APValue::getLValueOffset(), clang::CharUnits::getQuantity(), clang::interp::Pointer::isBlockPointer(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::Pointer::toAPValue().
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 1073 of file InterpBuiltin.cpp.
References Call(), clang::CharUnits::fromQuantity(), clang::Type::getAs(), clang::interp::State::getASTContext(), clang::interp::Pointer::getIntegerRepresentation(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::Type::getPointeeType(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::Invalid, clang::Type::isIncompleteType(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Pointer::isZero(), 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 1060 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
bool __c11_atomic_is_lock_free(size_t)
Definition at line 1145 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 941 of file InterpBuiltin.cpp.
References assignInteger(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::interp::Pointer::initialize(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 773 of file InterpBuiltin.cpp.
References Call(), EvaluateBuiltinClassifyType(), clang::interp::State::getLangOpts(), clang::Expr::getType(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 997 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 1166 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 494 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 1033 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 825 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 1683 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, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Can be called with an integer or vector as the first and only parameter.
Definition at line 1733 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(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2525 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_elementwise_fp_binop(), and InterpretBuiltin().
|
static |
Definition at line 2607 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_elementwise_int_binop(), and InterpretBuiltin().
|
static |
Definition at line 2486 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_elementwise_int_unaryop(), and InterpretBuiltin().
|
static |
Definition at line 2716 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_elementwise_maxmin(), and InterpretBuiltin().
|
static |
Definition at line 3176 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_elementwise_triop(), and InterpretBuiltin().
|
static |
Definition at line 2990 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, and X.
Referenced by interp__builtin_elementwise_triop_fp(), and InterpretBuiltin().
|
static |
Definition at line 789 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), discard(), clang::interp::InterpStack::discard(), clang::interp::InterpState::getContext(), popToAPSInt(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 715 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 522 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 508 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 666 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 1352 of file InterpBuiltin.cpp.
References assignInteger(), 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 2902 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_addsub(), and InterpretBuiltin().
|
static |
Definition at line 3517 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_cmp_mask(), and InterpretBuiltin().
|
static |
Definition at line 749 of file InterpBuiltin.cpp.
References Call(), popToUInt64(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3596 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_cvt_mask2vec(), and InterpretBuiltin().
|
static |
Definition at line 3574 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_cvt_vec2mask(), and InterpretBuiltin().
|
static |
Definition at line 3670 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 3619 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 4157 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_gfni_mul(), and InterpretBuiltin().
|
static |
Definition at line 3147 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_movmsk_op(), and InterpretBuiltin().
|
static |
Definition at line 4044 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_multishiftqb(), and InterpretBuiltin().
|
static |
Definition at line 2931 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_pclmulqdq(), and InterpretBuiltin().
|
static |
Definition at line 3356 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_phminposuw(), and InterpretBuiltin().
|
static |
Definition at line 2788 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_pmul(), and InterpretBuiltin().
|
static |
Definition at line 3395 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_pternlog(), and InterpretBuiltin().
|
static |
Definition at line 3831 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_shift_with_count(), and InterpretBuiltin().
|
static |
Definition at line 3894 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_shufbitqmb_mask(), and InterpretBuiltin().
|
static |
Definition at line 3736 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, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_shuffle_generic(), and InterpretBuiltin().
|
static |
Definition at line 3819 of file InterpBuiltin.cpp.
References Call(), and interp__builtin_ia32_shuffle_generic().
|
static |
Definition at line 3108 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_test_op(), and InterpretBuiltin().
|
static |
Definition at line 3956 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_vcvtps2ph(), and InterpretBuiltin().
|
static |
Definition at line 3547 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(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_vpconflict(), and InterpretBuiltin().
|
static |
Definition at line 481 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 1416 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 1185 of file InterpBuiltin.cpp.
References clang::CharUnits::alignmentAtOffset(), clang::interp::Descriptor::asValueDecl(), clang::interp::Pointer::atIndex(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::Ctx, clang::interp::State::FFDiag(), clang::CharUnits::fromQuantity(), clang::interp::State::getASTContext(), clang::ASTContext::getDeclAlign(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getIndex(), clang::ASTContext::getIntWidth(), clang::interp::Pointer::getNumElems(), clang::CharUnits::getQuantity(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isElementPastEnd(), 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 220 of file InterpBuiltin.cpp.
References Call(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::Expr::EvalStatus::Diag, clang::interp::Boolean::from(), clang::interp::Frame::getCallee(), clang::interp::InterpFrame::getDepth(), 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 2434 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Descriptor::asVarDecl(), clang::interp::Pointer::block(), Call(), clang::interp::InterpFrame::Caller, clang::interp::State::CCEDiag(), CheckDummy(), CheckLive(), CheckMutable(), clang::interp::InterpState::Current, Diag(), Ended, clang::Error, Error(), clang::interp::InterpState::EvaluatingDecl, clang::interp::InterpFrame::getCallee(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getLifetime(), clang::interp::InterpFrame::getRetPC(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::inConstantContext(), clang::interp::InterpState::InitializingBlocks, interp__builtin_is_within_lifetime(), clang::interp::Pointer::isActive(), clang::interp::Pointer::isOnePastEnd(), clang::IdentifierInfo::isStr(), clang::interp::Pointer::isZero(), 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 571 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 651 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 557 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 539 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 580 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 548 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 589 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 598 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 2092 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), clang::ASTContext::BuiltinInfo, Call(), clang::ASTContext::CharTy, CheckLoad(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::Pointer::deref(), diagnoseNonConstexprBuiltin(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ASTContext::getCharWidth(), clang::interp::InterpState::getContext(), clang::interp::Descriptor::getElemQualType(), getElemType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::Builtin::Context::getQuotedName(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::getType(), clang::interp::Pointer::getType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_memchr(), clang::interp::Descriptor::isArray(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::Type::isIncompleteType(), isOneByteCharacterType(), isReadable(), clang::interp::Pointer::isZero(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Sint8, clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and V.
Referenced by interp__builtin_memchr(), and InterpretBuiltin().
|
static |
Definition at line 1977 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(), 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(), INT_TYPE_SWITCH, clang::TargetInfo::isBigEndian(), clang::interp::Pointer::isBlockPointer(), isOneByteCharacterType(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), readPointerToBuffer(), clang::interp::InterpState::Stk, and swapBytes().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1820 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpState::Current, diagnoseNonConstexprBuiltin(), DoMemcpy(), clang::interp::Pointer::elemSize(), clang::interp::Pointer::expand(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), getElemType(), clang::interp::Pointer::getFieldDesc(), 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::Descriptor::isArray(), 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 819 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
Definition at line 414 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::InterpState::allocFloat(), clang::interp::Pointer::atIndex(), Call(), CheckLoad(), CheckRange(), clang::interp::Pointer::elem(), clang::interp::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getFloatTypeSemantics(), clang::interp::Pointer::getNumElems(), clang::ASTContext::getTargetInfo(), clang::Invalid, clang::interp::Pointer::isElementInitialized(), clang::TargetInfo::isNan2008(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2407 of file InterpBuiltin.cpp.
References Call(), evaluateBuiltinObjectSize(), clang::interp::State::getASTContext(), getType(), interp__builtin_object_size(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_object_size(), and InterpretBuiltin().
|
static |
Definition at line 1564 of file InterpBuiltin.cpp.
References clang::interp::Descriptor::asDecl(), clang::interp::Descriptor::asExpr(), clang::interp::Pointer::block(), Call(), clang::interp::State::CCEDiag(), clang::interp::State::checkingPotentialConstantExpression(), CheckNewDeleteForms(), clang::interp::InterpState::Current, clang::interp::DynamicAllocator::deallocate(), clang::interp::InterpStack::discard(), clang::interp::State::FFDiag(), clang::interp::DynamicAllocator::getAllocationForm(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::Pointer::getDeclDesc(), clang::interp::Block::getDescriptor(), clang::interp::Pointer::getFieldDesc(), clang::interp::InterpFrame::getSource(), clang::interp::InterpState::getStdAllocatorCaller(), clang::interp::Block::isDynamic(), clang::interp::Pointer::isZero(), clang::interp::State::Note(), clang::interp::DynamicAllocator::Operator, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::interp::Pointer::toDiagnosticString().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1456 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::interp::Descriptor::InlineDescMD, 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 1390 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 837 of file InterpBuiltin.cpp.
References assignInteger(), Call(), clang::interp::Pointer::canBeInitialized(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getTypeSize(), 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 735 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 1401 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2570 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, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_scalar_fp_round_mask_binop(), and InterpretBuiltin().
|
static |
AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]".
Definition at line 3052 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_select(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_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 3087 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), interp__builtin_select_scalar(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_select_scalar(), and InterpretBuiltin().
|
static |
Definition at line 607 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 260 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), Call(), CheckLive(), CheckRange(), clang::interp::Context::classify(), clang::interp::Pointer::deref(), diagnoseNonConstexprBuiltin(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::ASTContext::hasSameUnqualifiedType(), INT_TYPE_SWITCH, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), clang::interp::InterpState::Stk, and V.
Referenced by InterpretBuiltin().
|
static |
Definition at line 349 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), clang::interp::Pointer::block(), Call(), CheckArray(), CheckDummy(), CheckLive(), CheckRange(), clang::interp::Pointer::deref(), diagnoseNonConstexprBuiltin(), clang::interp::State::getASTContext(), clang::interp::Descriptor::getElemSize(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWCharType(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3438 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_vec_ext(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, clang::interp::InterpStack::push(), pushInteger(), clang::interp::InterpState::Stk, and V.
Referenced by interp__builtin_vec_ext(), and InterpretBuiltin().
|
static |
Definition at line 3465 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_vec_set(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_vec_set(), and InterpretBuiltin().
|
static |
Definition at line 1627 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, clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3239 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_x86_extract_vector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_x86_extract_vector(), and InterpretBuiltin().
|
static |
Definition at line 3274 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_x86_extract_vector_masked(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_x86_extract_vector_masked(), and InterpretBuiltin().
|
static |
Definition at line 3315 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_x86_insert_subvector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_x86_insert_subvector(), and InterpretBuiltin().
|
static |
Definition at line 2671 of file InterpBuiltin.cpp.
References assignInteger(), 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_x86_pack(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_x86_pack(), and InterpretBuiltin().
|
static |
Definition at line 2866 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(), and clang::interp::InterpState::Stk.
Referenced by interp_builtin_horizontal_fp_binop(), and InterpretBuiltin().
|
static |
Definition at line 2826 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(), and clang::interp::InterpState::Stk.
Referenced by interp_builtin_horizontal_int_binop(), and InterpretBuiltin().
|
static |
Definition at line 4098 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, and X.
Referenced by interp_builtin_ia32_gfni_affine(), and InterpretBuiltin().
|
static |
Definition at line 616 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 2600 of file Interp.cpp.
References clang::interp::InterpState::Current, Fn, clang::interp::InterpFrame::getPC(), InterpFunctions, clang::interp::InterpFrame::isRoot(), OpReturns(), 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 4192 of file InterpBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, clang::C, Call(), clang::Type::castAs(), clang::interp::InterpState::Current, EvalScalarMinMaxFp(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::InterpFrame::getLocation(), clang::VectorType::getNumElements(), clang::interp::InterpFrame::getRange(), 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_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_gfni_mul(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_pternlog(), 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_vpconflict(), 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_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_select(), interp__builtin_select_scalar(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vec_ext(), interp__builtin_vec_set(), interp__builtin_vector_reduce(), interp__builtin_x86_extract_vector(), interp__builtin_x86_extract_vector_masked(), interp__builtin_x86_insert_subvector(), interp__builtin_x86_pack(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_builtin_ia32_gfni_affine(), interp_floating_comparison(), InterpretBuiltin(), clang::Invalid, clang::Builtin::Context::isConstantEvaluated(), isNoopBuiltin(), NormalizeRotateAmount(), pushInteger(), clang::Result, 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 6064 of file InterpBuiltin.cpp.
References clang::OffsetOfNode::Array, clang::OffsetOfNode::Base, clang::OffsetOfNode::Field, 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::QualType::getNonReferenceType(), clang::OffsetOfExpr::getNumComponents(), clang::CXXBaseSpecifier::getType(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::OffsetOfExpr::getTypeSourceInfo(), clang::OffsetOfNode::Identifier, InterpretOffsetOf(), clang::CXXBaseSpecifier::isVirtual(), clang::ASTContext::recordOffsetOfEvaluation(), clang::Result, and clang::ASTContext::toCharUnitsFromBits().
Referenced by InterpretOffsetOf(), and OffsetOf().
|
inline |
Definition at line 696 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 97 of file InterpHelpers.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getLocation(), and clang::interp::InterpFrame::getRange().
Referenced by OffsetHelper().
| bool clang::interp::InvalidCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| CastKind | Kind, | ||
| bool | Fatal ) |
Definition at line 2422 of file Interp.cpp.
References clang::AK_Read, clang::cast(), 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::getLocation(), clang::interp::InterpFrame::getRange(), Reinterpret, ReinterpretLike, and Volatile.
| bool clang::interp::InvalidDeclRef | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const DeclRefExpr * | DR, | ||
| bool | InitializerFailed ) |
Definition at line 1156 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 2080 of file Interp.cpp.
References clang::cast(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), clang::Stmt::getSourceRange(), clang::isa(), clang::interp::InterpFrame::isStdFunction(), and clang::interp::InterpFrame::MSVCConstexprAllowed.
Referenced by CheckNewTypeMismatch().
| bool clang::interp::InvalidShuffleVectorIndex | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Index ) |
Definition at line 2140 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 3441 of file Interp.h.
References clang::AK_Assign, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getSource(), and clang::QualType::withVolatile().
|
inlinestatic |
Definition at line 3660 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 262 of file Interp.cpp.
References clang::interp::Descriptor::asValueDecl(), clang::interp::Block::getDescriptor(), clang::interp::Descriptor::IsConstexprUnknown, and clang::interp::Block::isDummy().
Referenced by CheckInvoke(), CheckLoad(), CheckNewTypeMismatch(), CheckStore(), CmpHelperEQ< Pointer >(), GetPtrBase(), GetPtrBasePop(), handleReference(), IncDecHelper(), and isConstexprUnknown().
Definition at line 268 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::Pointer::isBlockPointer(), and isConstexprUnknown().
Definition at line 51 of file PrimType.h.
References PT_Bool.
Referenced by clang::interp::Pointer::toRValue(), clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
Definition at line 52 of file PrimType.h.
References PT_IntAPS.
Referenced by clang::interp::Context::evaluateStrlen(), interp__builtin_is_aligned_up_down(), and Neg().
|
inline |
Definition at line 2888 of file Interp.h.
References clang::interp::Boolean::from(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Definition at line 29 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 1973 of file InterpBuiltin.cpp.
Referenced by interp__builtin_memcmp().
Definition at line 1133 of file Interp.h.
References clang::CallExpr::getBuiltinCallee().
Referenced by CmpHelperEQ< Pointer >().
|
static |
Definition at line 160 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().
Definition at line 54 of file PrimType.h.
References PT_MemberPtr, and PT_Ptr.
Referenced by DecayPtr(), 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 69 of file InterpBuiltin.cpp.
References clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Pointer::isLive(), and clang::interp::Pointer::isOnePastEnd().
Referenced by interp__builtin_memchr(), and interp__builtin_memcpy().
Definition at line 58 of file PrimType.h.
References PT_Sint16, PT_Sint32, PT_Sint64, and PT_Sint8.
Referenced by clang::interp::Compiler< Emitter >::VisitCastExpr().
|
static |
Does Ptr point to the last object AND to a flexible array member?
Definition at line 2301 of file InterpBuiltin.cpp.
References clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getLangOpts(), clang::interp::Descriptor::isArray(), and pointsToLastObject().
| bool clang::interp::LE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1343 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 2036 of file Interp.h.
References clang::interp::Pointer::canDeref(), CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Pointer::isBlockPointer(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::LoadPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2049 of file Interp.h.
References clang::interp::Pointer::canDeref(), CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Pointer::isBlockPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::LT | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1336 of file Interp.h.
References CmpHelper(), and clang::Less.
Referenced by CheckLifetime(), CheckShift(), 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().
|
inline |
Definition at line 2299 of file Interp.h.
References CheckLoad(), DoMemcpy(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Mul | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 383 of file Interp.h.
References AddSubMulHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 405 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, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 391 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 3152 of file Interp.h.
References clang::interp::Pointer::narrow(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::NE | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1329 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
Referenced by ctorArrayTy(), and dtorArrayTy().
|
constexpr |
Definition at line 130 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 135 of file PrimType.h.
References PT_Float, PT_IntAP, PT_IntAPS, and PT_MemberPtr.
| bool clang::interp::Neg | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 707 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, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3142 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getCallee(), clang::Decl::getEndLoc(), and PRESERVE_NONE.
|
inline |
Definition at line 2879 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| std::optional< Pointer > clang::interp::OffsetHelper | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const T & | Offset, | ||
| const Pointer & | Ptr, | ||
| bool | IsPointerArith = false ) |
Definition at line 2332 of file Interp.h.
References Add, clang::interp::Pointer::asBlockPointer(), clang::interp::Pointer::asFunctionPointer(), clang::interp::Pointer::asIntPointer(), clang::interp::Pointer::atIndex(), clang::interp::BlockPointer::Base, clang::interp::State::CCEDiag(), CheckArray(), CheckNull(), clang::CSK_ArrayIndex, clang::interp::InterpState::Current, clang::interp::IntPointer::Desc, clang::interp::Pointer::elemSize(), clang::interp::FunctionPointer::Func, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getIntegerRepresentation(), clang::interp::State::getLangOpts(), clang::interp::Pointer::getNumElems(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::inArray(), Invalid(), clang::interp::Descriptor::isArray(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isFunctionPointer(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Pointer::isOnePastEnd(), clang::interp::BlockPointer::Pointee, Pointer, clang::Result, and V.
Referenced by AddOffset(), ArrayElemPtr(), ArrayElemPtrPop(), IncDecPtrHelper(), and SubOffset().
|
inline |
Definition at line 3482 of file Interp.h.
References clang::OffsetOfExpr::getNumExpressions(), InterpretOffsetOf(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 154 of file Boolean.h.
References clang::interp::Boolean::print().
|
inline |
Definition at line 166 of file MemberPointer.h.
References clang::interp::MemberPointer::print().
|
inline |
Definition at line 885 of file Pointer.h.
References clang::interp::Pointer::block(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isBlockPointer(), clang::interp::Block::isDummy(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isOnePastEnd(), and clang::interp::Pointer::print().
|
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 325 of file Integral.h.
References clang::interp::Integral< Bits, Signed >::print().
|
inline |
Definition at line 370 of file IntegralAP.h.
References clang::interp::IntegralAP< Signed >::print().
|
inline |
Definition at line 111 of file PrimType.h.
References Dynamic, Reinterpret, ReinterpretLike, and Volatile.
Definition at line 2563 of file Interp.cpp.
Referenced by BCP(), and Interpret().
Does Ptr point to the last subobject?
Definition at line 2273 of file InterpBuiltin.cpp.
References clang::interp::Pointer::expand(), clang::interp::Pointer::getArray(), clang::interp::Pointer::getBase(), clang::interp::Pointer::getField(), clang::FieldDecl::getFieldIndex(), clang::interp::Record::getNumFields(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isBaseClass(), clang::interp::Pointer::isRoot(), and pointsToLastObject().
Referenced by isUserWritingOffTheEnd(), and pointsToLastObject().
| bool clang::interp::Pop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1376 of file Interp.h.
References clang::interp::InterpStack::discard(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 215 of file Interp.cpp.
References clang::interp::Context::classify(), clang::interp::InterpStack::discard(), clang::interp::InterpState::getContext(), PT_Ptr, clang::interp::InterpState::Stk, TYPE_SWITCH, and clang::interp::OptPrimType::value_or().
Referenced by cleanupAfterFunctionCall().
|
inline |
Definition at line 3406 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3374 of file Interp.h.
References clang::Expr::EvalStatus::Diag, clang::interp::InterpState::DiagIgnoreDepth, clang::interp::State::getEvalStatus(), and clang::interp::InterpState::PrevDiags.
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
|
inline |
Definition at line 3417 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Definition at line 56 of file InterpBuiltin.cpp.
References INT_TYPE_SWITCH, and clang::interp::InterpStack::pop().
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_expect(), 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_pclmulqdq(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_is_aligned_up_down(), interp__builtin_isfpclass(), interp__builtin_memchr(), interp__builtin_operator_new(), interp__builtin_overflowop(), interp__builtin_popcount(), interp__builtin_scalar_fp_round_mask_binop(), interp__builtin_select(), interp__builtin_select_scalar(), interp__builtin_vec_ext(), interp__builtin_vec_set(), interp__builtin_x86_extract_vector(), interp__builtin_x86_extract_vector_masked(), interp__builtin_x86_insert_subvector(), interp_builtin_ia32_gfni_affine(), popToAPSInt(), and popToAPSInt().
|
static |
Definition at line 60 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 63 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), popToAPSInt(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 51 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::Expr::getType(), INT_TYPE_SWITCH, clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_atomic_lock_free(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_ia32_crc32(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_object_size(), interp__builtin_scalar_fp_round_mask_binop(), and interp__builtin_strcmp().
| bool clang::interp::PreDec | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | CanOverflow ) |
Definition at line 968 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 978 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 889 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 900 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 23 of file PrimType.cpp.
References 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().
|
inlinestatic |
Definition at line 2817 of file Interp.h.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, 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::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3402 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3363 of file Interp.h.
References clang::Expr::EvalStatus::Diag, clang::interp::InterpState::DiagIgnoreDepth, clang::interp::InterpState::diagnosing(), clang::interp::State::getEvalStatus(), and clang::interp::InterpState::PrevDiags.
Referenced by BCP(), and clang::interp::EvalEmitter::speculate().
|
static |
Pushes Val on the stack as the type given by QT.
Definition at line 82 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(), clang::Type::isUnsignedIntegerOrEnumerationType(), PT_IntAP, PT_IntAPS, clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, 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_expect(), 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_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_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_vec_ext(), interp__builtin_vector_reduce(), interp_floating_comparison(), InterpretBuiltin(), and pushInteger().
|
static |
Definition at line 114 of file InterpBuiltin.cpp.
References pushInteger().
|
inline |
Definition at line 3411 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
inline |
Definition at line 3783 of file Interp.h.
References clang::interp::Program::getNativePointer(), clang::interp::InterpState::P, and clang::interp::CodePtr::read().
|
inline |
Definition at line 3827 of file Interp.h.
References align(), clang::interp::FixedPoint::bytesToSerialize(), and clang::interp::FixedPoint::deserialize().
|
inline |
Definition at line 3792 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 260 of file InterpBuiltinBitCast.cpp.
References Big, BITCAST_TYPE_SWITCH, clang::interp::Floating::bitcastToMemory(), clang::interp::Pointer::deref(), enumeratePointerFields(), clang::interp::Floating::getAPFloat(), clang::interp::Context::getASTContext(), clang::interp::Bits::getQuantity(), clang::ASTContext::getTargetInfo(), clang::if(), clang::interp::Pointer::isInitialized(), clang::TargetInfo::isLittleEndian(), Little, clang::interp::BitcastBuffer::markInitialized(), PT_Float, clang::interp::BitcastBuffer::pushData(), clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), and swapBytes().
Referenced by DoBitCast(), DoBitCastPtr(), and interp__builtin_memcmp().
| 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 627 of file Interp.h.
References clang::interp::InterpState::allocAP(), CheckDivRem(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| PRESERVE_NONE bool clang::interp::Ret | ( | InterpState & | S, |
| CodePtr & | PC ) |
Definition at line 251 of file Interp.h.
References clang::interp::InterpFrame::Caller, clang::interp::State::checkingPotentialConstantExpression(), cleanupAfterFunctionCall(), clang::interp::InterpState::Current, clang::interp::InterpFrame::free(), clang::interp::InterpFrame::getFrameOffset(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRetPC(), clang::interp::InterpStack::pop(), PRESERVE_NONE, clang::interp::InterpStack::push(), Ret(), clang::interp::InterpStack::size(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Record::getName(), and Ret().
|
inline |
Definition at line 274 of file Interp.h.
References clang::interp::InterpFrame::Caller, clang::interp::State::checkingPotentialConstantExpression(), cleanupAfterFunctionCall(), clang::interp::InterpState::Current, clang::interp::InterpFrame::free(), clang::interp::InterpFrame::getFrameOffset(), clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRetPC(), PRESERVE_NONE, clang::interp::InterpStack::size(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1238 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 1211 of file Interp.cpp.
References Call, clang::interp::InterpState::Current, 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::FunctionDecl::isTrivial(), clang::interp::Pointer::pointToSameBlock(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by RunDestructors().
|
inline |
Definition at line 2927 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.
| bool clang::interp::SetField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1477 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckRange(), CheckStore(), clang::CSK_Field, clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::SetGlobal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
| bool clang::interp::SetLocal | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
1) Pops the value from the stack.
2) Writes the value to the local variable with the given offset.
Definition at line 1440 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setLocal(), and clang::interp::InterpState::Stk.
| bool clang::interp::SetParam | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1455 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setParam(), and clang::interp::InterpState::Stk.
| bool clang::interp::SetThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1523 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckStore(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
| 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 6133 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atField(), clang::interp::Context::classify(), clang::interp::Pointer::deref(), clang::interp::InterpState::getContext(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::getType(), clang::interp::Pointer::initialize(), INT_TYPE_SWITCH, and SetThreeWayComparisonField().
Referenced by CMP3(), and SetThreeWayComparisonField().
|
inlinestatic |
Definition at line 3103 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 3085 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 3066 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 3427 of file Interp.h.
References clang::interp::State::noteSideEffect().
|
inline |
Definition at line 3453 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().
| bool clang::interp::StartLifetime | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 1939 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), clang::interp::InterpStack::peek(), startLifetimeRecurse(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 1920 of file Interp.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getLifetime(), clang::interp::Pointer::getRecord(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Pointer::narrow(), Started, clang::interp::Pointer::startLifetime(), and startLifetimeRecurse().
Referenced by CheckNewTypeMismatch(), StartLifetime(), and startLifetimeRecurse().
|
inline |
Definition at line 3384 of file Interp.h.
References clang::interp::InterpState::SpeculationDepth.
| bool clang::interp::Store | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2062 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreActivate | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2105 of file Interp.h.
References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreActivatePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2120 of file Interp.h.
References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreBitField | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2135 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreBitFieldActivate | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2166 of file Interp.h.
References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreBitFieldActivatePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2184 of file Interp.h.
References CheckStore(), clang::interp::Pointer::deref(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StoreBitFieldPop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2151 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::StorePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2074 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Sub | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 363 of file Interp.h.
References AddSubMulHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 371 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 2458 of file Interp.h.
References OffsetHelper(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
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 2518 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getIntegerRepresentation(), clang::interp::State::getLangOpts(), clang::interp::Pointer::getNumElems(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), handleOverflow(), clang::interp::Pointer::hasSameBase(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isElementPastEnd(), clang::Normal, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, 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 2900 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 GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisBitFieldActivate(), InitThisField(), InitThisFieldActivate(), SetThisField(), and This().
|
inline |
Definition at line 2309 of file Interp.h.
References clang::Member, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), 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 3356 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 2003 of file Interp.h.
References clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::interp::Pointer::stripBaseCasts().
Referenced by GetPtrThisVirtBase(), and GetPtrVirtBasePop().
| bool clang::interp::Zero | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2857 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 6150 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Descriptor::ElemRecord, clang::interp::Pointer::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::Pointer::narrow(), TYPE_SWITCH, and zeroAll().
Referenced by copyRecord(), and zeroAll().
|
inlinestatic |
Definition at line 2862 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2870 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 2585 of file Interp.cpp.
Referenced by BCP(), and Interpret().