clang 20.0.0git
|
Interface for the VM to interact with the AST walker's context. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/State.h"
Public Member Functions | |
virtual | ~State () |
virtual bool | checkingForUndefinedBehavior () const =0 |
virtual bool | checkingPotentialConstantExpression () const =0 |
virtual bool | noteUndefinedBehavior ()=0 |
virtual bool | keepEvaluatingAfterFailure () const =0 |
virtual Frame * | getCurrentFrame ()=0 |
virtual const Frame * | getBottomFrame () const =0 |
virtual bool | hasActiveDiagnostic ()=0 |
virtual void | setActiveDiagnostic (bool Flag)=0 |
virtual void | setFoldFailureDiagnostic (bool Flag)=0 |
virtual Expr::EvalStatus & | getEvalStatus () const =0 |
virtual ASTContext & | getCtx () const =0 |
virtual bool | hasPriorDiagnostic ()=0 |
virtual unsigned | getCallStackDepth ()=0 |
State ()=default | |
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) | |
OptionalDiagnostic | FFDiag (const Expr *E, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | FFDiag (const SourceInfo &SI, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
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. | |
OptionalDiagnostic | CCEDiag (const Expr *E, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | CCEDiag (const SourceInfo &SI, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
OptionalDiagnostic | Note (SourceLocation Loc, diag::kind DiagId) |
Add a note to a prior diagnostic. | |
void | addNotes (ArrayRef< PartialDiagnosticAt > Diags) |
Add a stack of notes to a prior diagnostic. | |
DiagnosticBuilder | report (SourceLocation Loc, diag::kind DiagId) |
Directly reports a diagnostic message. | |
const LangOptions & | getLangOpts () const |
Public Attributes | |
bool | InConstantContext = false |
Whether or not we're in a context where the front end requires a constant value. | |
Interface for the VM to interact with the AST walker's context.
|
default |
void State::addNotes | ( | ArrayRef< PartialDiagnosticAt > | Diags | ) |
OptionalDiagnostic State::CCEDiag | ( | const Expr * | E, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 53 of file State.cpp.
References E, and clang::Expr::getExprLoc().
OptionalDiagnostic State::CCEDiag | ( | const SourceInfo & | SI, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 58 of file State.cpp.
References clang::interp::SourceInfo::getLoc().
OptionalDiagnostic State::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.
FIXME: Stop evaluating if we're in EM_ConstantExpression or EM_PotentialConstantExpression mode and we produce one of these.
Definition at line 42 of file State.cpp.
Referenced by clang::interp::InterpState::maybeDiagnoseDanglingAllocations(), and clang::interp::InterpState::reportOverflow().
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
OptionalDiagnostic State::FFDiag | ( | const Expr * | E, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 26 of file State.cpp.
References Diag(), E, and clang::Expr::getExprLoc().
OptionalDiagnostic State::FFDiag | ( | const SourceInfo & | SI, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 34 of file State.cpp.
References Diag(), and clang::interp::SourceInfo::getLoc().
OptionalDiagnostic State::FFDiag | ( | SourceLocation | Loc, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::getCurrentFrame().
|
pure virtual |
Implemented in clang::interp::InterpState.
const LangOptions & State::getLangOpts | ( | ) | const |
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.
OptionalDiagnostic State::Note | ( | SourceLocation | Loc, |
diag::kind | DiagId | ||
) |
|
pure virtual |
Implemented in clang::interp::InterpState.
DiagnosticBuilder State::report | ( | SourceLocation | Loc, |
diag::kind | DiagId | ||
) |
|
pure virtual |
Implemented in clang::interp::InterpState.
|
pure virtual |
Implemented in clang::interp::InterpState.