13#ifndef LLVM_CLANG_AST_INTERP_STATE_H
14#define LLVM_CLANG_AST_INTERP_STATE_H
20class OptionalDiagnostic;
78 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
79 unsigned ExtraNotes = 0);
83 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
84 unsigned ExtraNotes = 0);
88 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
89 unsigned ExtraNotes = 0);
98 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
99 unsigned ExtraNotes = 0);
103 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
104 unsigned ExtraNotes = 0);
108 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
109 unsigned ExtraNotes = 0);
127 void addCallStack(
unsigned Limit);
132 unsigned ExtraNotes,
bool IsCCEDiag);
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A little helper class used to produce diagnostics.
This represents one expression.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
A partial diagnostic which we might know in advance that we are not going to emit.
Encodes a location in the source.
Base class for stack frames, shared between VM and walker.
Describes the statement/declaration an opcode was generated from.
Interface for the VM to interact with the AST walker's context.
virtual bool hasActiveDiagnostic()=0
virtual void setActiveDiagnostic(bool Flag)=0
virtual bool checkingPotentialConstantExpression() const =0
DiagnosticBuilder report(SourceLocation Loc, diag::kind DiagId)
Directly reports a diagnostic message.
virtual Frame * getCurrentFrame()=0
virtual bool noteUndefinedBehavior()=0
OptionalDiagnostic FFDiag(SourceLocation Loc, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0)
Diagnose that the evaluation could not be folded (FF => FoldFailure)
virtual Expr::EvalStatus & getEvalStatus() const =0
virtual unsigned getCallStackDepth()=0
virtual bool checkingForUndefinedBehavior() const =0
virtual ASTContext & getCtx() const =0
virtual bool keepEvaluatingAfterFailure() const =0
void addNotes(ArrayRef< PartialDiagnosticAt > Diags)
Add a stack of notes to a prior diagnostic.
virtual const Frame * getBottomFrame() const =0
const LangOptions & getLangOpts() const
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.
virtual void setFoldFailureDiagnostic(bool Flag)=0
virtual bool hasPriorDiagnostic()=0
bool InConstantContext
Whether or not we're in a context where the front end requires a constant value.
CheckSubobjectKind
The order of this enum is important for diagnostics.
AccessKinds
Kinds of access we can perform on an object, for diagnostics.
@ AK_ReadObjectRepresentation
EvalStatus is a struct with detailed info about an evaluation in progress.