clang 18.0.0git
|
EvalStatus is a struct with detailed info about an evaluation in progress. More...
#include "clang/AST/Expr.h"
Public Member Functions | |
EvalStatus ()=default | |
bool | hasSideEffects () const |
Public Attributes | |
bool | HasSideEffects = false |
Whether the evaluated expression has side effects. | |
bool | HasUndefinedBehavior = false |
Whether the evaluation hit undefined behavior. | |
SmallVectorImpl< PartialDiagnosticAt > * | Diag = nullptr |
Diag - If this is non-null, it will be filled in with a stack of notes indicating why evaluation failed (or why it failed to produce a constant expression). | |
EvalStatus is a struct with detailed info about an evaluation in progress.
|
default |
|
inline |
Definition at line 616 of file Expr.h.
References HasSideEffects.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfGlobalTemporary().
SmallVectorImpl<PartialDiagnosticAt>* clang::Expr::EvalStatus::Diag = nullptr |
Diag - If this is non-null, it will be filled in with a stack of notes indicating why evaluation failed (or why it failed to produce a constant expression).
If the expression is unfoldable, the notes will indicate why it's not foldable. If the expression is foldable, but not a constant expression, the notes will describes why it isn't a constant expression. If the expression is a constant expression, no notes will be produced.
Definition at line 610 of file Expr.h.
Referenced by calculateConstraintSatisfaction(), clang::Sema::CheckForImmediateInvocation(), clang::Sema::ConstantFoldAttrArgs(), diagnoseWellFormedUnsatisfiedConstraintExpr(), EvaluateAndDiagnoseImmediateInvocation(), clang::Expr::EvaluateAsInitializer(), EvaluateConvertedConstantExpression(), clang::VarDecl::evaluateDestruction(), clang::Expr::EvaluateKnownConstInt(), clang::Expr::EvaluateKnownConstIntCheckOverflow(), isNullPointerValueTemplateArgument(), and clang::Sema::VerifyIntegerConstantExpression().
Whether the evaluated expression has side effects.
For example, (f() && 0) can be folded, but it still has side effects.
Definition at line 596 of file Expr.h.
Referenced by CheckEvalInICE(), EvaluateDestruction(), clang::VarDecl::evaluateDestruction(), hasSideEffects(), isNullPointerValueTemplateArgument(), and clang::Sema::VerifyIntegerConstantExpression().