struct Expr::EvalStatus
Declaration
struct Expr::EvalStatus { /* full declaration omitted */ };
Description
EvalStatus is a struct with detailed info about an evaluation in progress.
Declared at: clang/include/clang/AST/Expr.h:582
Member Variables
- public bool HasSideEffects
- Whether the evaluated expression has side effects. For example, (f() & & 0) can be folded, but it still has side effects.
- public bool HasUndefinedBehavior
- Whether the evaluation hit undefined behavior. For example, 1.0 / 0.0 can be folded to Inf, but has undefined behavior. Likewise, INT_MAX + 1 can be folded to INT_MIN, but has UB.
- public SmallVectorImpl<clang::PartialDiagnosticAt>* Diag
- 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.
Method Overview
- public EvalStatus()
- public bool hasSideEffects() const
Methods
¶EvalStatus()
EvalStatus()
Declared at: clang/include/clang/AST/Expr.h:601
¶bool hasSideEffects() const
bool hasSideEffects() const
Declared at: clang/include/clang/AST/Expr.h:606