clang
10.0.0git
|
Interface for the VM to interact with the AST walker's context. More...
#include "/work/www-prereleases/10.0.0/rc2/docsbuild/clang/lib/AST/Interp/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 |
OptionalDiagnostic | FFDiag (SourceLocation Loc, diag::kind DiagId=diag::note_invalid_subexpr_in_const_expr, unsigned ExtraNotes=0) |
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. More... | |
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. More... | |
void | addNotes (ArrayRef< PartialDiagnosticAt > Diags) |
Add a stack of notes to a prior diagnostic. More... | |
DiagnosticBuilder | report (SourceLocation Loc, diag::kind DiagId) |
Directly reports a diagnostic message. More... | |
const LangOptions & | getLangOpts () const |
Interface for the VM to interact with the AST walker's context.
void State::addNotes | ( | ArrayRef< PartialDiagnosticAt > | Diags | ) |
Add a stack of notes to a prior diagnostic.
Definition at line 68 of file State.cpp.
References Diag(), clang::Expr::EvalStatus::Diag, getEvalStatus(), and hasActiveDiagnostic().
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 41 of file State.cpp.
References Diag(), getEvalStatus(), and setActiveDiagnostic().
Referenced by clang::interp::AddSubMulHelper(), CCEDiag(), clang::interp::InterpState::reportOverflow(), clang::interp::ShiftLeft(), clang::interp::Shl(), clang::interp::Shr(), and clang::interp::Trunc().
OptionalDiagnostic State::CCEDiag | ( | const Expr * | E, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 52 of file State.cpp.
References CCEDiag(), 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 57 of file State.cpp.
References CCEDiag(), and clang::interp::SourceInfo::getLoc().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::checkingForUndefinedBehavior().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::checkingPotentialConstantExpression(), and report().
OptionalDiagnostic State::FFDiag | ( | SourceLocation | Loc, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 20 of file State.cpp.
Referenced by clang::interp::Context::isPotentialConstantExpr(), and clang::interp::NoRet().
OptionalDiagnostic State::FFDiag | ( | const Expr * | E, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 25 of file State.cpp.
References Diag(), getEvalStatus(), clang::Expr::getExprLoc(), and setActiveDiagnostic().
OptionalDiagnostic State::FFDiag | ( | const SourceInfo & | SI, |
diag::kind | DiagId = diag::note_invalid_subexpr_in_const_expr , |
||
unsigned | ExtraNotes = 0 |
||
) |
Definition at line 33 of file State.cpp.
References Diag(), getEvalStatus(), clang::interp::SourceInfo::getLoc(), and setActiveDiagnostic().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::getBottomFrame(), and getLangOpts().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by getLangOpts(), and report().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::getCtx(), getLangOpts(), and report().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::getCurrentFrame(), getLangOpts(), and clang::interp::InterpState::getSplitFrame().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by addNotes(), CCEDiag(), FFDiag(), clang::interp::InterpState::getEvalStatus(), and report().
const LangOptions & State::getLangOpts | ( | ) | const |
Definition at line 115 of file State.cpp.
References getBottomFrame(), clang::interp::Frame::getCaller(), getCallStackDepth(), getCtx(), getCurrentFrame(), and clang::ASTContext::getLangOpts().
Referenced by clang::interp::ShiftLeft().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by addNotes(), clang::interp::InterpState::hasActiveDiagnostic(), and Note().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::hasPriorDiagnostic(), and report().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::keepEvaluatingAfterFailure().
OptionalDiagnostic State::Note | ( | SourceLocation | Loc, |
diag::kind | DiagId | ||
) |
Add a note to a prior diagnostic.
Definition at line 62 of file State.cpp.
References hasActiveDiagnostic().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by clang::interp::InterpState::noteUndefinedBehavior().
DiagnosticBuilder State::report | ( | SourceLocation | Loc, |
diag::kind | DiagId | ||
) |
Directly reports a diagnostic message.
Definition at line 75 of file State.cpp.
References checkingPotentialConstantExpression(), clang::Expr::EvalStatus::Diag, getCallStackDepth(), clang::DiagnosticsEngine::getConstexprBacktraceLimit(), getCtx(), clang::ASTContext::getDiagnostics(), getEvalStatus(), hasPriorDiagnostic(), min(), clang::DiagnosticsEngine::Report(), setActiveDiagnostic(), and setFoldFailureDiagnostic().
Referenced by clang::interp::AddSubMulHelper().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by CCEDiag(), FFDiag(), report(), and clang::interp::InterpState::setActiveDiagnostic().
|
pure virtual |
Implemented in clang::interp::InterpState.
Referenced by report(), and clang::interp::InterpState::setFoldFailureDiagnostic().