19 using namespace clang;
26 : Parent(Parent), M(M), P(P), Stk(Stk), Ctx(Ctx), Current(nullptr),
27 CallStackDepth(Parent.getCallStackDepth() + 1) {}
53 CCEDiag(E, diag::note_constexpr_overflow) << Value << Type;
63 char *Memory =
reinterpret_cast<char *
>(malloc(
sizeof(
DeadBlock) + Size));
64 auto *D =
new (Memory)
DeadBlock(DeadBlocks, B);
Descriptor for a dead block.
A (possibly-)qualified type.
InterpFrame * Current
The current frame.
bool hasPointers() const
Checks if the block has any live pointers.
Interface for classes which map locations to sources.
Frame storing local variables.
The base class of the type hierarchy.
Descriptor * getDescriptor() const
Returns the block's descriptor.
Holds all information required to evaluate constexpr code in a module.
InterpFrame * Caller
The frame of the previous function.
bool reportOverflow(const Expr *E, const llvm::APSInt &Value)
Reports overflow and return true if evaluation should continue.
A memory block, either on the stack or in the heap.
bool noteUndefinedBehavior() override
InterpSize getSize() const
Returns the size of the block.
Describes a memory block created by an allocation site.
Stack frame storing temporaries and parameters.
This represents one expression.
The program contains and links the bytecode for all functions.
Base class for stack frames, shared between VM and walker.
virtual Frame * getCurrentFrame()=0
char * data()
Returns a pointer to the stored data.
Frame * getCurrentFrame() override
Dataflow Directional Tag Classes.
InterpState(State &Parent, Program &P, InterpStack &Stk, Context &Ctx, SourceMapper *M=nullptr)
void deallocate(Block *B)
Deallocates a pointer.
OptionalDiagnostic CCEDiag(SourceLocation Loc, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0)
Diagnose that the evaluation does not produce a C++11 core constant expression.
Interface for the VM to interact with the AST walker's context.