16#ifndef LLVM_CLANG_AST_INTERP_CONTEXT_H
17#define LLVM_CLANG_AST_INTERP_CONTEXT_H
78 std::unique_ptr<Program> P;
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
Represents a function declaration or definition.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A (possibly-)qualified type.
Represents a variable declaration or definition.
Holds all information required to evaluate constexpr code in a module.
const LangOptions & getLangOpts() const
Returns the language options.
~Context()
Cleans up the constexpr VM.
unsigned getCharBit() const
Returns CHAR_BIT.
bool evaluateAsInitializer(State &Parent, const VarDecl *VD, APValue &Result)
Evaluates a toplevel initializer.
const llvm::fltSemantics & getFloatSemantics(QualType T) const
Return the floating-point semantics for T.
ASTContext & getASTContext() const
Returns the AST context.
bool isPotentialConstantExpr(State &Parent, const FunctionDecl *FnDecl)
Checks if a function is a potential constant expression.
bool evaluateAsRValue(State &Parent, const Expr *E, APValue &Result)
Evaluates a toplevel expression as an rvalue.
InterpStack & getStack()
Returns the interpreter stack.
std::optional< PrimType > classify(QualType T) const
Classifies an expression.
Stack frame storing temporaries and parameters.
Interface for the VM to interact with the AST walker's context.
PrimType
Enumeration of the primitive types of the VM.
@ Result
The result type of a method or function.