|
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 | Char |
| struct | CharRepr |
| struct | CharRepr< false > |
| struct | CharRepr< true > |
| class | CodePtr |
| Pointer into the code segment. More... | |
| class | Compiler |
| Compilation context for expressions. More... | |
| class | Context |
| Holds all information required to evaluate constexpr code in a module. More... | |
| class | DeadBlock |
| Descriptor for a dead block. More... | |
| 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 , NotStarted , Destroyed , 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 class | IntegralKind : uint8_t { Number = 0 , Address , BlockAddress , LabelAddress , FunctionAddress , AddrLabelDiff } |
| 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) |
| template<bool Signed> | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Char< Signed > I) |
| 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) |
| 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 Block *B, AccessKinds AK) |
| static bool | CheckLifetime (InterpState &S, CodePtr OpPC, Lifetime LT, const Block *B, AccessKinds AK) |
| static bool | CheckLifetime (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
| static bool | CheckWeak (InterpState &S, CodePtr OpPC, const Block *B) |
| bool | CheckGlobalLoad (InterpState &S, CodePtr OpPC, const Block *B) |
| Checks a direct load of a primitive value from a global or local variable. | |
| bool | CheckLocalLoad (InterpState &S, CodePtr OpPC, const Block *B) |
| bool | CheckLoad (InterpState &S, CodePtr OpPC, 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 IsCtorDtor=false) |
| 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 | getBase (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Off, bool NullOK) |
| bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
| bool | GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK) |
| bool | GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK, const Type *TargetType) |
| static bool | checkConstructor (InterpState &S, CodePtr OpPC, const Function *Func, const Pointer &ThisPtr) |
| static bool | diagnoseOutOfLifetimeDestroy (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| bool | CheckDestructor (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
| bool | CheckFunctionDecl (InterpState &S, CodePtr OpPC, const FunctionDecl *FD) |
| Opcode. Check if the function decl can be called at compile time. | |
| bool | CheckBitCast (InterpState &S, CodePtr OpPC, const Type *TargetType, bool SrcIsVoidPtr) |
| 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 | StartThisLifetime (InterpState &S, CodePtr OpPC) |
| bool | StartThisLifetime1 (InterpState &S, CodePtr OpPC) |
| static void | setLifeStateRecurse (const Pointer &Ptr, Lifetime L) |
| 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 | MarkDestroyed (InterpState &S, CodePtr OpPC) |
| 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 | CheckIntegralAddressCast (InterpState &S, CodePtr OpPC, unsigned BitWidth) |
| bool | CastPointerIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| bool | CastPointerIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
| bool | CheckBitCast (InterpState &S, CodePtr OpPC, bool HasIndeterminateBits, bool TargetIsUCharOrByte) |
| bool | handleReference (InterpState &S, CodePtr OpPC, Block *B) |
| bool | GetTypeid (InterpState &S, 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. | |
| bool | GetMemberPtr (InterpState &S, CodePtr OpPC, const ValueDecl *D) |
| bool | GetMemberPtrBase (InterpState &S, CodePtr OpPC) |
| bool | GetMemberPtrDecl (InterpState &S, CodePtr OpPC) |
| bool | CopyMemberPtrPath (InterpState &S, CodePtr OpPC, const RecordDecl *Entry, bool IsDerived) |
| Just append the given Entry to the MemberPointer's path. | |
| 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<typename T, template< typename U > class Op> | |
| static bool | AddSubNonNumber (InterpState &S, CodePtr OpPC, T LHS, T RHS) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Add (InterpState &S, CodePtr OpPC) |
| bool | Addf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Sub (InterpState &S, CodePtr OpPC) |
| bool | Subf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Mul (InterpState &S, CodePtr OpPC) |
| bool | Mulf (InterpState &S, CodePtr OpPC, uint32_t FPOI) |
| template<PrimType Name, class T = typename PrimConv<Name>::T> | |
| bool | Mulc (InterpState &S, 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 | CheckRefInit (InterpState &S, CodePtr OpPC) |
| 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 | 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 | 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) |
| bool | StartInit (InterpState &S, CodePtr OpPC) |
| bool | EndInit (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 | CheckArrayDestSize (InterpState &S, CodePtr OpPC, size_t NumElems) |
Check if the destination array we're initializing can hold the NumElems elements. | |
| bool | Alloc (InterpState &S, CodePtr OpPC, const Descriptor *Desc) |
| template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
| bool | AllocN (InterpState &S, CodePtr OpPC, PrimType T, const Expr *Source, bool IsNoThrow) |
| template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
| bool | AllocCN (InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow) |
| static bool | IsConstantContext (InterpState &S, 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 bool | popToUInt64 (const InterpState &S, const Expr *E, uint64_t &Out) |
| static bool | popToAPSInt (InterpStack &Stk, PrimType T, APSInt &Out) |
| static bool | popToAPSInt (InterpState &S, const Expr *E, APSInt &Out) |
| static bool | popToAPSInt (InterpState &S, QualType T, APSInt &Out) |
| static bool | isReadable (const Pointer &P) |
| Check for common reasons a pointer can't be read from, which are usually not diagnosed in a builtin function. | |
| static void | pushInteger (InterpState &S, const APSInt &Val, QualType QT) |
Pushes Val on the stack as the type given by QT. | |
| template<typename T> | |
| static void | pushInteger (InterpState &S, T Val, QualType QT) |
| static void | assignIntegral (InterpState &S, const Pointer &Dest, PrimType ValueT, const APSInt &Value) |
| static QualType | getElemType (const Pointer &P) |
| static void | diagnoseNonConstexprBuiltin (InterpState &S, CodePtr OpPC, unsigned ID) |
| static 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, bool IsAdd) |
| (CarryIn, LHS, RHS, Result) | |
| static bool | interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_ptrauth_string_discriminator (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_infer_alloc_token (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_operator_new (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_operator_delete (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_arithmetic_fence (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
| static bool | interp__builtin_vector_reduce (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_elementwise_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID) |
| static bool | interp__builtin_elementwise_countzeroes (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID) |
| Can be called with an integer or vector as the first and only parameter. | |
| static bool | interp__builtin_memcpy (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID) |
| static bool | isOneByteCharacterType (QualType T) |
| Determine if T is a character type for which we guarantee that sizeof(T) == 1. | |
| static bool | interp__builtin_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_ia32_pack (InterpState &S, CodePtr, const CallExpr *E, llvm::function_ref< APInt(const APSInt &)> PackFn) |
| static bool | interp__builtin_elementwise_maxmin (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinID) |
| static bool | interp__builtin_ia32_pmul (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &, const APSInt &, const APSInt &)> Fn) |
| static bool | interp__builtin_ia32_dbpsadbw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp_builtin_horizontal_int_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &)> Fn) |
| static bool | interp_builtin_horizontal_fp_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APFloat(const APFloat &, const APFloat &, llvm::RoundingMode)> Fn) |
| static bool | interp__builtin_ia32_addsub (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_pclmulqdq (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_elementwise_triop_fp (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APFloat(const APFloat &, const APFloat &, const APFloat &, llvm::RoundingMode)> Fn) |
| static bool | interp__builtin_ia32_select (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]". | |
| static bool | interp__builtin_ia32_select_scalar (InterpState &S, const CallExpr *Call) |
| Scalar variant of AVX512 predicated select: Result[i] = (Mask bit 0) ? | |
| static bool | interp__builtin_ia32_test_op (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< bool(const APInt &A, const APInt &B)> Fn) |
| static bool | interp__builtin_ia32_movmsk_op (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_elementwise_triop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &, const APSInt &)> Fn) |
| static bool | interp__builtin_ia32_extract_vector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_extract_vector_masked (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_insert_subvector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_phminposuw (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_pternlog (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool MaskZ) |
| static bool | interp__builtin_ia32_vec_ext (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_vec_set (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | evalICmpImm (uint8_t Imm, const APSInt &A, const APSInt &B, bool IsUnsigned) |
| static bool | interp__builtin_ia32_cmp_mask (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID, bool IsUnsigned) |
| static bool | interp__builtin_ia32_vpconflict (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_cvt_vec2mask (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_cvt_mask2vec (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID) |
| static bool | interp__builtin_ia32_cvtsd2ss (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool HasRoundingMask) |
| static bool | interp__builtin_ia32_cvtpd2ps (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool IsMasked, bool HasRounding) |
| static bool | interp__builtin_ia32_shuffle_generic (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::pair< unsigned, int >(unsigned, const APInt &)> GetSourceIndex) |
| static bool | interp__builtin_ia32_shuffle_generic (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< std::pair< unsigned, int >(unsigned, unsigned)> GetSourceIndex) |
| static bool | interp__builtin_ia32_shift_with_count (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APInt &, uint64_t)> ShiftOp, llvm::function_ref< APInt(const APInt &, unsigned)> OverflowOp) |
| static bool | interp__builtin_ia32_shufbitqmb_mask (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_vcvtps2ph (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_multishiftqb (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| static bool | interp__builtin_ia32_gfni_affine (InterpState &S, CodePtr OpPC, const CallExpr *Call, bool Inverse) |
| static bool | interp__builtin_ia32_gfni_mul (InterpState &S, CodePtr OpPC, const CallExpr *Call) |
| 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. | |
| template<typename T> | |
| bool | CheckAddUB (T A, T B, T &R) |
| template<typename T> | |
| bool | CheckSubUB (T A, T B, T &R) |
| template<typename T> | |
| bool | CheckMulUB (T A, T B, T &R) |
| size_t | primSize (PrimType Type) |
| Returns the size of a primitive type in bytes. | |
| constexpr bool | isIntegerOrBoolType (PrimType T) |
| constexpr bool | isIntegerType (PrimType T) |
| constexpr bool | isPtrType (PrimType T) |
| constexpr bool | isSignedType (PrimType T) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, interp::CastKind CK) |
| template<typename T> | |
| constexpr bool | needsAlloc () |
| constexpr bool | needsAlloc (PrimType T) |
| template<typename T> | |
| constexpr bool | isIntegralOrPointer () |
| 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 2830 of file Interp.cpp.
| using clang::interp::SourceMap = std::vector<std::pair<unsigned, SourceInfo>> |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Reinterpret | |
| ReinterpretLike | |
| Volatile | |
| Dynamic | |
Definition at line 105 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 | |
|---|---|
| Number | Just a number, nothing else. |
| Address | A pointer to a ValueDecl. |
| BlockAddress | A pointer to an interp::Block. |
| LabelAddress | A pointer to a AddrLabelExpr. |
| FunctionAddress | A pointer to a FunctionDecl. |
| AddrLabelDiff | Difference between two AddrLabelExpr. |
Definition at line 24 of file Primitives.h.
|
strong |
| Enumerator | |
|---|---|
| Started | |
| NotStarted | |
| Destroyed | |
| Ended | |
Definition at line 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 34 of file PrimType.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Block | |
| FullExpression | |
| Call | |
Definition at line 107 of file Compiler.h.
|
strong |
|
strong |
|
inlinestatic |
Definition at line 709 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 2159 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 2166 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 381 of file Interp.h.
References AddSubMulHelper(), AddSubNonNumber(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 398 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 2521 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 305 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::State::checkingForUndefinedBehavior(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), handleFixedPointOverflow(), handleOverflow(), isIntegralOrPointer(), clang::QualType::isWrapType(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::State::report(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 356 of file Interp.h.
References Number, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Aligns a size to the pointer alignment.
Definition at line 201 of file PrimType.h.
Referenced by aligned(), BCP(), Call(), 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 208 of file PrimType.h.
References aligned().
Definition at line 205 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 3772 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 3826 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 3787 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 2708 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 2465 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), clang::cast(), clang::interp::Pointer::getDeclDesc(), clang::interp::Descriptor::getElemDataSize(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::isOnePastEnd(), and clang::interp::Pointer::pointsToStringLiteral().
Referenced by CmpHelperEQ< Pointer >().
|
inline |
Just takes a pointer and checks if it's an incomplete array type.
Definition at line 3458 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 3403 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 3415 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 3342 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 3373 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 139 of file InterpBuiltin.cpp.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::deref(), clang::interp::Boolean::from(), INT_TYPE_SWITCH_NO_BOOL, PT_Bool, PT_IntAP, and PT_IntAPS.
Referenced by interp__builtin_carryop(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_pack(), and interp__builtin_overflowop().
|
inline |
Definition at line 3656 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 2881 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 652 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3959 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), DoBitCastPtr(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isArrayRoot(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3886 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 677 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), 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 702 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), 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 1782 of file Interp.cpp.
References clang::AK_MemberCall, align(), 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, RVOPtr(), 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_dbpsadbw(), interp__builtin_ia32_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_gfni_mul(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shift_with_count(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_test_op(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_ia32_vpconflict(), interp__builtin_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_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_floating_comparison(), and InterpretBuiltin().
| bool clang::interp::CallBI | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const CallExpr * | CE, | ||
| uint32_t | BuiltinID ) |
Definition at line 1997 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 2008 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 1732 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 1911 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 2687 of file Interp.h.
References AddrLabelDiff, CheckIntegralAddressCast(), clang::Invalid, isIntegralOrPointer(), Number, 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 2743 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), 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 2762 of file Interp.h.
References clang::interp::InterpState::allocAP(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
static |
Definition at line 2676 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 2725 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 2952 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 2962 of file Interp.h.
References handleOverflow(), Int, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2936 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 2802 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 2832 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 2854 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 2716 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 2920 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 2781 of file Interp.h.
References clang::interp::InterpState::allocFloat(), CheckFloatResult(), clang::interp::Floating::fromIntegral(), clang::FPOptions::getFromOpaqueInt(), getRoundingMode(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| bool clang::interp::CastMemberPtrBasePop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| int32_t | Off, | ||
| const RecordDecl * | BaseDecl ) |
DerivedToBaseMemberPointer.
Definition at line 2726 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 2738 of file Interp.cpp.
References appendToMemberPointer(), castBackMemberPointer(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2393 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 2883 of file Interp.h.
References Address, clang::interp::Descriptor::asDecl(), clang::interp::Descriptor::asExpr(), clang::interp::Pointer::asFunctionPointer(), clang::interp::Pointer::block(), BlockAddress, CheckPointerToIntegralCast(), clang::interp::FunctionPointer::Func, FunctionAddress, clang::interp::Function::getDecl(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getIntegerRepresentation(), clang::Invalid, clang::isa(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Pointer::isFunctionPointer(), isIntegralOrPointer(), LabelAddress, 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 304 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().
|
inline |
Definition at line 48 of file Primitives.h.
Referenced by clang::interp::Char< false >::add(), and clang::interp::Integral< Bits, false >::add().
|
inlinestatic |
Definition at line 3869 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 404 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().
|
inline |
Check if the destination array we're initializing can hold the NumElems elements.
Definition at line 3758 of file Interp.h.
References CheckArraySize(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::Pointer::getNumElems(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isUnknownSizeArray(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 32 of file EvaluationResult.cpp.
References clang::interp::Pointer::allElementsInitialized(), clang::interp::Pointer::atIndex(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::Descriptor::ElemDesc, clang::interp::Descriptor::ElemRecord, clang::interp::Pointer::getField(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::isArray(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), 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(), CheckArrayDestSize(), and interp__builtin_operator_new().
| bool clang::interp::CheckBCPResult | ( | InterpState & | S, |
| const Pointer & | Ptr ) |
Definition at line 284 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 2389 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 1677 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 1042 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::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 1070 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 566 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::State::checkingPotentialConstantExpression(), 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 442 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 494 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 1602 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 3737 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 1196 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 1172 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), getIdentifier(), clang::interp::InterpFrame::getSource(), noteValueLocation(), and clang::interp::Pointer::toDiagnosticString().
Referenced by Free().
|
inline |
Definition at line 3982 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 1639 of file Interp.cpp.
References clang::AK_Destroy, clang::interp::Pointer::block(), CheckActive(), CheckLifetime(), CheckLive(), CheckRange(), CheckTemporary(), clang::interp::InterpState::Current, Destroyed, diagnoseOutOfLifetimeDestroy(), Ended, 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 198 of file Interp.h.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getSource(), clang::Expr::getType(), and isIntegralOrPointer().
| 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 546 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 1216 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 MarkDestroyed().
| bool clang::interp::CheckDynamicMemoryAllocation | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks if dynamic memory allocation is available in the current language mode.
Definition at line 1145 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 3700 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 386 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(), CheckLoad(), CheckNewTypeMismatch(), and CheckStore().
|
static |
Definition at line 68 of file EvaluationResult.cpp.
References clang::interp::Pointer::atField(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::State::FFDiag(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getLocation(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::isActive(), clang::interp::Descriptor::isArray(), clang::Type::isIncompleteArrayType(), clang::interp::Pointer::isInitialized(), clang::interp::Descriptor::isRecord(), and clang::Result.
Referenced by CheckArrayInitialized(), CheckFieldsInitialized(), and clang::interp::EvaluationResult::checkFullyInitialized().
| bool clang::interp::CheckFinalLoad | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
This is not used by any of the opcodes directly.
It's used by EvalEmitter to do the final lvalue-to-rvalue conversion.
Definition at line 875 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::block(), CheckActive(), CheckConstant(), CheckDummy(), CheckExtern(), CheckLifetime(), CheckLive(), CheckMutable(), CheckTemporary(), CheckWeak(), DiagnoseUninitialized(), 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 1098 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 1662 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 746 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 952 of file Interp.cpp.
References clang::AK_Assign, CheckLive(), and CheckRange().
| bool clang::interp::CheckIntegralAddressCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| unsigned | BitWidth ) |
Definition at line 2358 of file Interp.cpp.
References clang::Default, clang::interp::State::getASTContext(), clang::TargetInfo::getPointerWidth(), and clang::ASTContext::getTargetInfo().
Referenced by Cast(), and CheckPointerToIntegralCast().
|
static |
Definition at line 937 of file Interp.cpp.
References clang::AK_MemberCall, CheckLifetime(), CheckLive(), CheckMutable(), CheckRange(), isConstexprUnknown(), and clang::interp::Pointer::isDummy().
|
static |
Definition at line 724 of file Interp.cpp.
References clang::interp::Pointer::block(), CheckLifetime(), and clang::interp::Pointer::getLifetime().
|
static |
Definition at line 712 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), LT(), noteValueLocation(), and Started.
Referenced by CheckDestructor(), CheckFinalLoad(), CheckInvoke(), CheckLifetime(), CheckLoad(), CheckLocalLoad(), CheckNewTypeMismatch(), and CheckStore().
| bool clang::interp::CheckLiteralType | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Type * | T ) |
Definition at line 1440 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 412 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::State::checkingPotentialConstantExpression(), clang::CSK_Field, clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::isDynamic(), clang::interp::Pointer::isField(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isZero(), and noteValueLocation().
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 798 of file Interp.cpp.
References clang::interp::Descriptor::asExpr(), 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::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::interp::InterpFrame::getLocation(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::interp::Block::isAccessible(), clang::interp::Pointer::isArrayRoot(), clang::Type::isArrayType(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), clang::interp::Pointer::isField(), clang::interp::Pointer::isInitialized(), clang::interp::Pointer::isZero(), and clang::interp::State::Note().
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 777 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().
|
inline |
Definition at line 66 of file Primitives.h.
References int.
Referenced by clang::interp::Char< false >::mul(), and clang::interp::Integral< Bits, false >::mul().
| bool clang::interp::CheckMutable | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr ) |
Checks if a pointer points to a mutable field.
Definition at line 590 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(), CheckInvoke(), 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 1154 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 2169 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::isArrayElement(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), 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 3879 of file Interp.h.
References CheckNewTypeMismatch(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3685 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 1234 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 502 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 getBase(), GetField(), getField(), GetFieldPop(), GetPtrDerivedPop(), GetPtrVirtBasePop(), IncDecPtrHelper(), OffsetHelper(), and SetField().
| bool clang::interp::CheckPointerToIntegralCast | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| unsigned | BitWidth ) |
Definition at line 2335 of file Interp.cpp.
References clang::interp::State::CCEDiag(), CheckIntegralAddressCast(), clang::interp::InterpState::Current, clang::interp::Pointer::getIndex(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::Invalid, clang::interp::Pointer::isDummy(), clang::interp::Pointer::isIntegralPointer(), and clang::interp::Pointer::isZero().
Referenced by CastPointerIntegral(), CastPointerIntegralAP(), and CastPointerIntegralAPS().
|
inline |
Definition at line 3649 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 513 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(), CheckRefInit(), 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 525 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().
|
inline |
Definition at line 1980 of file Interp.h.
References clang::AK_Read, CheckRange(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::CheckShift | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const LT & | LHS, | ||
| const RT & | RHS, | ||
| unsigned | Bits ) |
Checks if the shift operation is legal.
Definition at line 151 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 908 of file Interp.cpp.
References clang::AK_Assign, clang::interp::Pointer::block(), CheckActive(), CheckConst(), CheckDummy(), CheckExtern(), CheckGlobal(), CheckLifetime(), CheckLive(), CheckRange(), CheckVolatile(), 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 535 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 getBase(), getField(), and GetPtrDerivedPop().
|
inline |
Definition at line 57 of file Primitives.h.
Referenced by clang::interp::Char< false >::sub(), and clang::interp::Integral< Bits, false >::sub().
| bool clang::interp::CheckThis | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Checks the 'this' pointer.
Definition at line 1081 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 607 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 729 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 230 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 1417 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 1181 of file Interp.h.
References Fn, clang::Invalid, isIntegralOrPointer(), 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 1204 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 1368 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 1258 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 160 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 1160 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 40 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::Char< false >::compare(), clang::interp::Integral< Bits, false >::compare(), and DoShift().
|
static |
Definition at line 1723 of file Interp.cpp.
References clang::Definition, clang::Func, clang::interp::InterpState::getContext(), and clang::interp::InterpState::P.
|
static |
Definition at line 2294 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 2314 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 1514 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Integral< Bits, Signed >::from(), needsAlloc(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1542 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 186 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 204 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 3427 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeElement(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 6697 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().
| bool clang::interp::CopyMemberPtrPath | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const RecordDecl * | Entry, | ||
| bool | IsDerived ) |
Just append the given Entry to the MemberPointer's path.
This is used to re-inject APValues into the bytecode interpreter.
Definition at line 2793 of file Interp.cpp.
References clang::interp::InterpState::allocMemberPointerPath(), clang::cast(), clang::interp::MemberPointer::getPathLength(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 2546 of file Interp.cpp.
References clang::interp::Pointer::deref(), clang::interp::MemberPointer::getPathLength(), needsAlloc(), and clang::interp::InterpState::P.
|
static |
Definition at line 2516 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 6642 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 3622 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 1024 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 3713 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 1035 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1137 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1147 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 1051 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 1062 of file Interp.h.
References clang::AK_Decrement, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2581 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 2658 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::destroy(), diagnoseOutOfLifetimeDestroy(), Ended, clang::interp::InterpFrame::getFunction(), clang::interp::Pointer::getLifetime(), clang::interp::InterpFrame::getLocalBlock(), clang::interp::InterpFrame::getLocalPointer(), clang::interp::Function::getScope(), clang::interp::Block::isInitialized(), and clang::interp::Scope::locals_reverse().
|
static |
Definition at line 960 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 1419 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 172 of file InterpBuiltin.cpp.
References clang::ASTContext::BuiltinInfo, clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpState::diagnosing(), clang::interp::State::getASTContext(), clang::interp::State::getLangOpts(), clang::Builtin::Context::getQuotedName(), and clang::interp::InterpFrame::getSource().
Referenced by interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_strcmp(), and interp__builtin_strlen().
|
static |
Definition at line 1623 of file Interp.cpp.
References clang::interp::Descriptor::asDecl(), clang::cast(), clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getLifetime(), clang::interp::Descriptor::getLocation(), Started, and clang::interp::Pointer::toDiagnosticString().
Referenced by CheckDestructor(), and Destroy().
| bool clang::interp::DiagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| bool | Extern, | ||
| const Block * | B, | ||
| AccessKinds | AK ) |
Definition at line 661 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, diagnoseMissingInitializer(), diagnoseNonConstVariable(), clang::interp::InterpState::EvaluatingDecl, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::interp::Block::getDescriptor(), clang::interp::State::getLangOpts(), clang::interp::InterpFrame::getRange(), clang::interp::InterpFrame::getSource(), clang::VarDecl::isStaticDataMember(), clang::interp::State::Note(), and noteValueLocation().
| bool clang::interp::DiagnoseUninitialized | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const Pointer & | Ptr, | ||
| AccessKinds | AK ) |
Definition at line 654 of file Interp.cpp.
References clang::interp::Pointer::block(), DiagnoseUninitialized(), 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 2457 of file Interp.cpp.
References clang::cast(), clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, and clang::interp::InterpFrame::getExpr().
|
static |
Definition at line 48 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_delete(), interp__builtin_operator_new(), clang::interp::Compiler< Emitter >::visit(), clang::interp::Compiler< Emitter >::VisitAbstractConditionalOperator(), clang::interp::Compiler< Emitter >::VisitArrayInitLoopExpr(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitCallExpr(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitComplexUnaryOperator(), clang::interp::Compiler< Emitter >::VisitCompoundLiteralExpr(), clang::interp::Compiler< Emitter >::visitCXXForRangeStmt(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::visitForStmt(), clang::interp::Compiler< Emitter >::visitInitList(), clang::interp::Compiler< Emitter >::VisitMaterializeTemporaryExpr(), clang::interp::Compiler< Emitter >::VisitMemberExpr(), clang::interp::Compiler< Emitter >::VisitObjCBoxedExpr(), clang::interp::Compiler< Emitter >::VisitOffsetOfExpr(), clang::interp::Compiler< Emitter >::VisitPseudoObjectExpr(), clang::interp::Compiler< Emitter >::visitStmt(), clang::interp::Compiler< Emitter >::VisitUnaryOperator(), and clang::interp::Compiler< Emitter >::VisitVectorUnaryOperator().
| bool clang::interp::Div | ( | InterpState & | S, |
| CodePtr | OpPC ) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS / RHS' on the stack
Definition at line 750 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 559 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 776 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 355 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 388 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 396 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(), Failure, 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::Result, clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), Skip, clang::Success, 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 6737 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 515 of file InterpBuiltinBitCast.cpp.
References enumeratePointerFields(), clang::interp::InterpState::getContext(), clang::interp::Pointer::isBlockPointer(), clang::Result, and Success.
|
inline |
Definition at line 3106 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 3188 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 2062 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 1483 of file Interp.h.
References clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2671 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::enableLocal(), and clang::interp::InterpFrame::isLocalEnabled().
|
inline |
Definition at line 3573 of file Interp.h.
References clang::interp::InterpState::InitializingBlocks.
| bool clang::interp::EndLifetime | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the peek'd pointer.
Definition at line 2141 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), Ended, clang::interp::InterpStack::peek(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
| bool clang::interp::EndLifetimePop | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Ends the lifetime of the pop'd pointer.
Definition at line 2151 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), Ended, clang::interp::InterpStack::pop(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3581 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 1410 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
|
inline |
Do nothing and just abort execution.
Definition at line 3612 of file Interp.h.
Referenced by interp__builtin_is_within_lifetime().
|
static |
Definition at line 3707 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 2416 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 3324 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 2563 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 2035 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 2042 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 2051 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 2611 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 2028 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 1496 of file Interp.h.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2975 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 1321 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::Pointer::expand(), 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 1471 of file Interp.h.
References CmpHelper(), clang::Equal, and clang::Greater.
|
static |
Definition at line 1525 of file Interp.cpp.
References clang::interp::Pointer::asIntPointer(), clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), clang::CSK_Base, clang::interp::State::getASTContext(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Descriptor::isRecord(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by GetPtrBase(), and GetPtrBasePop().
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 1882 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 158 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_pack(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_test_op(), interp__builtin_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), and interp__builtin_strcmp().
| bool clang::interp::GetField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack
Definition at line 1595 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 1472 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 1627 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 3482 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 1670 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 1682 of file Interp.h.
References clang::AK_Read, clang::interp::Block::deref(), DiagnoseUninitialized(), clang::interp::Block::getBlockDesc(), clang::interp::Program::getGlobal(), Initialized, clang::interp::Block::isExtern(), clang::interp::InterpState::P, clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 3489 of file Interp.h.
References Address, BlockAddress, clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, FunctionAddress, clang::interp::Program::getFunction(), clang::interp::Program::getGlobal(), clang::interp::State::getLangOpts(), clang::interp::Program::getOrCreateGlobal(), clang::interp::InterpFrame::getSource(), clang::Invalid, isIntegralOrPointer(), clang::interp::InterpState::P, 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 1554 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 2677 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::InterpFrame::isLocalEnabled(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtr | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const ValueDecl * | D ) |
Definition at line 2751 of file Interp.cpp.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtrBase | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2756 of file Interp.cpp.
References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetMemberPtrDecl | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2766 of file Interp.cpp.
References clang::Func, clang::interp::InterpState::getContext(), clang::interp::Context::getOrCreateFunction(), clang::Method, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetParam | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Index ) |
Definition at line 1578 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.
| bool clang::interp::GetPtrBase | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off ) |
Definition at line 1554 of file Interp.cpp.
References getBase(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
| bool clang::interp::GetPtrBasePop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off, | ||
| bool | NullOK ) |
Definition at line 1558 of file Interp.cpp.
References getBase(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by CallVirt().
| bool clang::interp::GetPtrDerivedPop | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | Off, | ||
| bool | NullOK, | ||
| const Type * | TargetType ) |
Definition at line 1563 of file Interp.cpp.
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::getFieldDesc(), clang::interp::Pointer::getRecord(), clang::interp::InterpFrame::getSource(), clang::interp::Descriptor::getType(), clang::interp::Pointer::isBlockPointer(), clang::interp::Descriptor::isRecord(), 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 1515 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 1520 of file Interp.cpp.
References getField(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1992 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 1970 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 1985 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 2018 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), clang::interp::InterpFrame::isBottomFrame(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and This().
|
inline |
Definition at line 2008 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 2094 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 2085 of file Interp.h.
References CheckNull(), clang::CSK_Base, clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and VirtBaseHelper().
|
inline |
Definition at line 1975 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 378 of file IntegralAP.h.
| bool clang::interp::GetThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1641 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 2425 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 2431 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 1464 of file Interp.h.
References CmpHelper(), and clang::Greater.
| bool clang::interp::handleFixedPointOverflow | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const FixedPoint & | FP ) |
Definition at line 2314 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 2406 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 1314 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 944 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 956 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 1097 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 862 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(), isIntegralOrPointer(), 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 2547 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 1117 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecFloatHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 1127 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 972 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 983 of file Interp.h.
References clang::AK_Increment, CheckConst(), CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 2572 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 2276 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(), clang::interp::Compiler< Emitter >::visitVarDecl(), and clang::interp::Context::~Context().
| bool clang::interp::InitBitField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | FieldOffset, | ||
| uint32_t | FieldBitWidth ) |
Definition at line 1892 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, isIntegralOrPointer(), 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 1929 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, isIntegralOrPointer(), 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 2301 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 2338 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 1856 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 1874 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 1699 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 1735 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 1754 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 2287 of file Interp.h.
References CheckInit(), clang::interp::Pointer::initialize(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2666 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 1802 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), isIntegralOrPointer(), 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 1827 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), CheckThis(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getDepth(), clang::interp::InterpFrame::getThis(), isIntegralOrPointer(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and This().
| bool clang::interp::InitThisField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1767 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 1784 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 732 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 826 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 1690 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 266 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
__builtin_assume_aligned(Ptr, Alignment[, ExtraOffset])
Definition at line 1353 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 1117 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 1102 of file InterpBuiltin.cpp.
References Call(), popToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
bool __c11_atomic_is_lock_free(size_t)
Definition at line 1191 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 967 of file InterpBuiltin.cpp.
References assignIntegral(), 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 790 of file InterpBuiltin.cpp.
References Call(), EvaluateBuiltinClassifyType(), clang::interp::State::getLangOpts(), clang::Expr::getType(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1029 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 1214 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 500 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 1070 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 844 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 1754 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 1806 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 2617 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 2707 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 2576 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 2822 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 3362 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 3172 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 806 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 725 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 528 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 514 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 674 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 1410 of file InterpBuiltin.cpp.
References assignIntegral(), Call(), clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3082 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 3731 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 762 of file InterpBuiltin.cpp.
References Call(), popToUInt64(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 3814 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 3792 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 3892 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 3839 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 2936 of file InterpBuiltin.cpp.
References Call(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::interp::InterpState::getContext(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_dbpsadbw(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToUInt64(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_dbpsadbw(), and InterpretBuiltin().
|
static |
Definition at line 3433 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_extract_vector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_extract_vector(), and InterpretBuiltin().
|
static |
Definition at line 3470 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_extract_vector_masked(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_extract_vector_masked(), and InterpretBuiltin().
|
static |
Definition at line 4332 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 4393 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 3515 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_insert_subvector(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpState::Stk, and TYPE_SWITCH.
Referenced by interp__builtin_ia32_insert_subvector(), and InterpretBuiltin().
|
static |
Definition at line 3333 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 4278 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 2777 of file InterpBuiltin.cpp.
References assignIntegral(), clang::Type::castAs(), clang::interp::Context::classify(), clang::interp::Pointer::elem(), clang::CallExpr::getArg(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::VectorType::getElementType(), getElemType(), clang::ASTContext::getIntWidth(), clang::VectorType::getNumElements(), clang::Expr::getType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_pack(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_pack(), and InterpretBuiltin().
|
static |
Definition at line 3111 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 3558 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 2898 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 3597 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 |
AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]".
Definition at line 3234 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH, INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_select(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_select(), and InterpretBuiltin().
|
static |
Scalar variant of AVX512 predicated select: Result[i] = (Mask bit 0) ?
LHS[i] : RHS[i], but only element 0 may change. All other elements are taken from RHS.
Definition at line 3271 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), interp__builtin_ia32_select_scalar(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_select_scalar(), and InterpretBuiltin().
|
static |
Definition at line 4061 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 4124 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 3960 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 4049 of file InterpBuiltin.cpp.
References Call(), and interp__builtin_ia32_shuffle_generic().
|
static |
Definition at line 3294 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 4188 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 3646 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::interp::Descriptor::getPrimType(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vec_ext(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::InterpStack::pop(), popToAPSInt(), PT_Float, clang::interp::InterpStack::push(), pushInteger(), clang::interp::InterpState::Stk, and V.
Referenced by interp__builtin_ia32_vec_ext(), and InterpretBuiltin().
|
static |
Definition at line 3675 of file InterpBuiltin.cpp.
References Call(), clang::interp::Pointer::elem(), clang::interp::Pointer::initializeAllElements(), INT_TYPE_SWITCH_NO_BOOL, interp__builtin_ia32_vec_set(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), popToAPSInt(), and clang::interp::InterpState::Stk.
Referenced by interp__builtin_ia32_vec_set(), and InterpretBuiltin().
|
static |
Definition at line 3765 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 487 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 1477 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 1233 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 234 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 2524 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 577 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 657 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 563 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 545 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 586 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 554 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 595 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 604 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 2174 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 2055 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::ASTContext::BuiltinInfo, clang::interp::BitcastBuffer::byteSize(), Call(), CheckLoad(), clang::interp::Context::classify(), clang::interp::InterpState::Current, clang::interp::BitcastBuffer::Data, clang::interp::BitcastBuffer::deref(), diagnoseNonConstexprBuiltin(), clang::interp::State::FFDiag(), FIXED_SIZE_INT_TYPE_SWITCH, clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), getElemType(), clang::interp::Pointer::getNumElems(), clang::CharUnits::getQuantity(), clang::interp::Bytes::getQuantity(), clang::Builtin::Context::getQuotedName(), clang::interp::InterpFrame::getSource(), clang::ASTContext::getTargetInfo(), clang::interp::Pointer::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::getTypeSizeInChars(), clang::ASTContext::getWCharType(), clang::if(), clang::TargetInfo::isBigEndian(), clang::interp::Pointer::isBlockPointer(), isOneByteCharacterType(), clang::interp::InterpStack::pop(), popToUInt64(), pushInteger(), readPointerToBuffer(), clang::interp::InterpState::Stk, and swapBytes().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1896 of file InterpBuiltin.cpp.
References Call(), clang::interp::InterpState::Current, diagnoseNonConstexprBuiltin(), DoMemcpy(), 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 838 of file InterpBuiltin.cpp.
References Call().
Referenced by InterpretBuiltin().
|
static |
Definition at line 420 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 2495 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 1627 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::Context::classify(), clang::interp::InterpState::Current, clang::interp::DynamicAllocator::deallocate(), discard(), clang::interp::InterpStack::discard(), clang::interp::State::FFDiag(), clang::interp::DynamicAllocator::getAllocationForm(), clang::interp::InterpState::getAllocator(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::interp::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 1517 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 1451 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 858 of file InterpBuiltin.cpp.
References assignIntegral(), Call(), clang::interp::Pointer::canBeInitialized(), clang::interp::Context::classify(), clang::interp::State::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getIntWidth(), clang::interp::Pointer::initialize(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isDummy(), clang::Type::isSignedIntegerOrEnumerationType(), clang::interp::InterpStack::pop(), popToAPSInt(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 747 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 1462 of file InterpBuiltin.cpp.
References Call(), clang::cast(), clang::interp::InterpStack::pop(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.
Referenced by InterpretBuiltin().
|
static |
Definition at line 2666 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 |
Definition at line 613 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 274 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 365 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(), FIXED_SIZE_INT_TYPE_SWITCH, clang::interp::State::getASTContext(), clang::interp::Descriptor::getElemDataSize(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Descriptor::getPrimType(), 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 1698 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 3046 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 3006 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 622 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 2847 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 4428 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::ASTContext::getIntWidth(), 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_dbpsadbw(), interp__builtin_ia32_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_gfni_mul(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_movmsk_op(), interp__builtin_ia32_multishiftqb(), interp__builtin_ia32_pack(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_phminposuw(), interp__builtin_ia32_pmul(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shift_with_count(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_test_op(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_ia32_vpconflict(), interp__builtin_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_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_builtin_horizontal_fp_binop(), interp_builtin_horizontal_int_binop(), interp_floating_comparison(), InterpretBuiltin(), clang::Invalid, clang::Builtin::Context::isConstantEvaluated(), isNoopBuiltin(), NormalizeRotateAmount(), pushInteger(), clang::Result, V, and X.
Referenced by CallBI(), and InterpretBuiltin().
| bool clang::interp::InterpretOffsetOf | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| const OffsetOfExpr * | E, | ||
| ArrayRef< int64_t > | ArrayIndices, | ||
| int64_t & | IntResult ) |
Interpret an offsetof operation.
Definition at line 6515 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 796 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 2623 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 1201 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 2267 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 2327 of file Interp.cpp.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), and clang::interp::InterpFrame::getSource().
|
inline |
Definition at line 3628 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 3864 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 272 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 >(), handleReference(), IncDecHelper(), and isConstexprUnknown().
Definition at line 278 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::interp::Pointer::isBlockPointer(), isConstexprUnknown(), and clang::interp::Pointer::isZero().
Definition at line 52 of file PrimType.h.
References PT_Bool.
Referenced by clang::interp::Descriptor::getElemDataSize(), clang::interp::Pointer::toRValue(), clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
Definition at line 53 of file PrimType.h.
References PT_IntAPS.
Referenced by clang::interp::Context::evaluateStrlen(), interp__builtin_is_aligned_up_down(), and Neg().
|
constexpr |
Definition at line 140 of file PrimType.h.
Referenced by Add(), AddSubMulHelper(), BitAnd(), BitOr(), BitXor(), Cast(), CastAP(), CastAPS(), CastIntegralFloating(), CastPointerIntegral(), CheckDivRem(), CmpHelper(), GetIntPtr(), IncDecHelper(), InitBitField(), InitBitFieldActivate(), InitThisBitField(), InitThisBitFieldActivate(), Mul(), Sub(), and SubPtr().
|
inline |
Definition at line 3054 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 30 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 2051 of file InterpBuiltin.cpp.
Referenced by interp__builtin_memcmp().
Definition at line 1246 of file Interp.h.
References clang::CallExpr::getBuiltinCallee().
Referenced by CmpHelperEQ< Pointer >().
|
static |
Definition at line 151 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 55 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 81 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 59 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 2389 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 1456 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 2110 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 2123 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 1449 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().
| bool clang::interp::MarkDestroyed | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2160 of file Interp.cpp.
References clang::AK_Destroy, CheckDummy(), Destroyed, clang::interp::InterpStack::peek(), setLifeStateRecurse(), and clang::interp::InterpState::Stk.
|
inline |
Definition at line 2373 of file Interp.h.
References CheckLoad(), DoMemcpy(), clang::interp::Pointer::getRecord(), clang::interp::Record::isAnonymousUnion(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
| bool clang::interp::Mul | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 464 of file Interp.h.
References AddSubMulHelper(), clang::Invalid, isIntegralOrPointer(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 491 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 477 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 3318 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 1442 of file Interp.h.
References CmpHelperEQ(), and clang::Equal.
Referenced by ctorArrayTy(), and dtorArrayTy().
|
constexpr |
Definition at line 131 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 136 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 807 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 3308 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 3045 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 2408 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 3669 of file Interp.h.
References clang::OffsetOfExpr::getNumExpressions(), InterpretOffsetOf(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
| llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
| Char< Signed > | I ) |
Definition at line 217 of file Char.h.
References clang::interp::Char< Signed >::print().
|
inline |
Definition at line 153 of file Boolean.h.
References clang::interp::Boolean::print().
|
inline |
Definition at line 173 of file MemberPointer.h.
References clang::interp::MemberPointer::print().
|
inline |
Definition at line 894 of file Pointer.h.
References clang::interp::Pointer::block(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isArrayRoot(), clang::interp::Pointer::isBlockPointer(), clang::interp::Block::isDummy(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isZero(), 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 430 of file Integral.h.
References clang::interp::Integral< Bits, Signed >::print().
|
inline |
Definition at line 371 of file IntegralAP.h.
References clang::interp::IntegralAP< Signed >::print().
|
inline |
Definition at line 112 of file PrimType.h.
References Dynamic, Reinterpret, ReinterpretLike, and Volatile.
Definition at line 2810 of file Interp.cpp.
Referenced by BCP(), and Interpret().
Does Ptr point to the last subobject?
Definition at line 2361 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 1489 of file Interp.h.
References clang::interp::InterpStack::discard(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 225 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 3593 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3550 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 3604 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
static |
Definition at line 62 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_extract_vector(), interp__builtin_ia32_extract_vector_masked(), interp__builtin_ia32_gfni_affine(), interp__builtin_ia32_insert_subvector(), interp__builtin_ia32_pclmulqdq(), interp__builtin_ia32_pternlog(), interp__builtin_ia32_select(), interp__builtin_ia32_select_scalar(), interp__builtin_ia32_shufbitqmb_mask(), interp__builtin_ia32_shuffle_generic(), interp__builtin_ia32_vcvtps2ph(), interp__builtin_ia32_vec_ext(), interp__builtin_ia32_vec_set(), interp__builtin_is_aligned_up_down(), interp__builtin_isfpclass(), interp__builtin_memchr(), interp__builtin_operator_new(), interp__builtin_overflowop(), interp__builtin_popcount(), interp__builtin_scalar_fp_round_mask_binop(), popToAPSInt(), and popToAPSInt().
|
static |
Definition at line 72 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 75 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), popToAPSInt(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 52 of file InterpBuiltin.cpp.
References clang::interp::Context::classify(), clang::interp::InterpState::getContext(), clang::Expr::getType(), and INT_TYPE_SWITCH.
Referenced by interp__builtin_atomic_lock_free(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_ia32_crc32(), interp__builtin_ia32_dbpsadbw(), interp__builtin_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 1075 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 1085 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 996 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 1007 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 24 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 2983 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 3589 of file Interp.h.
References clang::interp::InterpState::ConstantContextOverride.
|
inline |
Definition at line 3539 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 94 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_ia32_vec_ext(), interp__builtin_infer_alloc_token(), interp__builtin_is_aligned_up_down(), interp__builtin_is_within_lifetime(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_memcmp(), interp__builtin_object_size(), interp__builtin_os_log_format_buffer_size(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_floating_comparison(), InterpretBuiltin(), and pushInteger().
|
static |
Definition at line 126 of file InterpBuiltin.cpp.
References pushInteger().
|
inline |
Definition at line 3598 of file Interp.h.
References clang::interp::InterpState::Current, and clang::interp::InterpFrame::MSVCConstexprAllowed.
|
inline |
Definition at line 3991 of file Interp.h.
References clang::interp::Program::getNativePointer(), clang::interp::InterpState::P, and clang::interp::CodePtr::read().
|
inline |
Definition at line 4035 of file Interp.h.
References align(), clang::interp::FixedPoint::bytesToSerialize(), and clang::interp::FixedPoint::deserialize().
|
inline |
Definition at line 4000 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 283 of file InterpBuiltinBitCast.cpp.
References Big, BITCAST_TYPE_SWITCH, clang::interp::Floating::bitcastToMemory(), clang::interp::Pointer::deref(), enumeratePointerFields(), Failure, 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::Result, clang::interp::Bits::roundToBytes(), clang::interp::BitcastBuffer::size(), Success, 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 727 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 258 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 281 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 1283 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 1256 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 3093 of file Interp.h.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getFunction(), clang::interp::InterpFrame::getRVOPtr(), clang::interp::Function::hasRVO(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by Call().
| bool clang::interp::SetField | ( | InterpState & | S, |
| CodePtr | OpPC, | ||
| uint32_t | I ) |
Definition at line 1609 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 ) |
Definition at line 2119 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::Descriptor::isPrimitiveArray(), clang::interp::Pointer::narrow(), clang::interp::Pointer::setLifeState(), setLifeStateRecurse(), and Started.
Referenced by EndLifetime(), EndLifetimePop(), MarkDestroyed(), and setLifeStateRecurse().
| 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 1572 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 1587 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 1655 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 6584 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 3269 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 3251 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 3232 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 3614 of file Interp.h.
References clang::interp::State::noteSideEffect().
|
inline |
Definition at line 3640 of file Interp.h.
References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getExpr(), clang::interp::InterpFrame::getRange(), and clang::interp::InterpState::inConstantContext().
|
inline |
Definition at line 3567 of file Interp.h.
References clang::interp::Pointer::block(), clang::interp::InterpState::InitializingBlocks, clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 2070 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(), startLifetimeRecurse(), and StartThisLifetime().
|
inline |
Definition at line 3560 of file Interp.h.
References clang::interp::InterpState::SpeculationDepth.
| bool clang::interp::StartThisLifetime | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2095 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), and startLifetimeRecurse().
| bool clang::interp::StartThisLifetime1 | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2106 of file Interp.cpp.
References clang::interp::State::checkingPotentialConstantExpression(), clang::interp::InterpState::Current, clang::interp::InterpFrame::getThis(), and clang::interp::Pointer::startLifetime().
| bool clang::interp::Store | ( | InterpState & | S, |
| CodePtr | OpPC ) |
Definition at line 2136 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 2179 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 2194 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 2209 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 2240 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 2258 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 2225 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 2148 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 410 of file Interp.h.
References AddSubMulHelper(), AddSubNonNumber(), clang::cast(), clang::Invalid, isIntegralOrPointer(), LabelAddress, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
Definition at line 452 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 2534 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 2594 of file Interp.h.
References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::State::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::Decl::getDeclContext(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::getIntegerRepresentation(), clang::AddrLabelExpr::getLabel(), clang::interp::State::getLangOpts(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::getPointedToLabel(), clang::interp::InterpFrame::getSource(), clang::interp::Pointer::getType(), handleOverflow(), clang::interp::Pointer::hasSameBase(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isElementPastEnd(), isIntegralOrPointer(), clang::Normal, clang::interp::Pointer::pointsToLabel(), 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 3066 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 2385 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 3532 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 2077 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 3023 of file Interp.h.
References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.
|
static |
Definition at line 6601 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 3028 of file Interp.h.
References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::push(), clang::Result, and clang::interp::InterpState::Stk.
|
inlinestatic |
Definition at line 3036 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 2832 of file Interp.cpp.
Referenced by BCP(), and Interpret().