13#ifndef LLVM_CLANG_AST_INTERP_STATE_H
14#define LLVM_CLANG_AST_INTERP_STATE_H
20class OptionalDiagnostic;
79 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
80 unsigned ExtraNotes = 0);
84 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
85 unsigned ExtraNotes = 0);
89 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
90 unsigned ExtraNotes = 0);
99 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
100 unsigned ExtraNotes = 0);
104 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
105 unsigned ExtraNotes = 0);
109 diag::kind DiagId = diag::note_invalid_subexpr_in_const_expr,
110 unsigned ExtraNotes = 0);
128 void addCallStack(
unsigned Limit);
133 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.
The JSON file list parser is used to communicate input to InstallAPI.
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.