struct Sema::ExpressionEvaluationContextRecord

Declaration

struct Sema::ExpressionEvaluationContextRecord { /* full declaration omitted */ };

Description

Data structure used to record current or nested expression evaluation contexts.

Declared at: clang/include/clang/Sema/Sema.h:1271

Member Variables

public clang::Sema::ExpressionEvaluationContext Context
The expression evaluation context.
public clang::CleanupInfo ParentCleanup
Whether the enclosing context needed a cleanup.
public unsigned int NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
public unsigned int NumTypos
The number of typos encountered during this expression evaluation context (i.e. the number of TypoExprs created).
public clang::Sema::MaybeODRUseExprSet SavedMaybeODRUseExprs
public SmallVector<clang::LambdaExpr*, 2> Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
public clang::Decl* ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declaration context does not suffice, e.g., in a default function argument.
public SmallVector<clang::CallExpr*, 8> DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking the completeness of the return type.
public SmallVector<clang::CXXBindTemporaryExpr*, 8> DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferred checking the destructor.
public llvm::SmallPtrSet<const Expr*, 8> PossibleDerefs
public SmallVector<clang::Expr*, 2> VolatileAssignmentLHSs
Expressions appearing as the LHS of a volatile assignment in this context. We produce a warning for these when popping the context if they are not discarded-value expressions nor unevaluated operands.
public llvm::SmallVector<ImmediateInvocationCandidate, 4> ImmediateInvocationCandidates
Set of candidates for starting an immediate invocation.
public llvm::SmallPtrSet<DeclRefExpr*, 4> ReferenceToConsteval
Set of DeclRefExprs referencing a consteval function when used in a context not already known to be immediately invoked.
public enum ExpressionKind ExprContext
public bool InDiscardedStatement
public bool InImmediateFunctionContext

Method Overview

Methods

ExpressionEvaluationContextRecord(
    clang::Sema::ExpressionEvaluationContext
        Context,
    unsigned int NumCleanupObjects,
    clang::CleanupInfo ParentCleanup,
    clang::Decl* ManglingContextDecl,
    clang::Sema::
        ExpressionEvaluationContextRecord::
            ExpressionKind ExprContext)

Declared at: clang/include/clang/Sema/Sema.h:1330

Parameters

clang::Sema::ExpressionEvaluationContext Context
unsigned int NumCleanupObjects
clang::CleanupInfo ParentCleanup
clang::Decl* ManglingContextDecl
clang::Sema::ExpressionEvaluationContextRecord:: ExpressionKind ExprContext

bool isConstantEvaluated() const

Declared at: clang/include/clang/Sema/Sema.h:1346

bool isDiscardedStatementContext() const

Declared at: clang/include/clang/Sema/Sema.h:1357

bool isImmediateFunctionContext() const

Declared at: clang/include/clang/Sema/Sema.h:1351

bool isUnevaluated() const

Declared at: clang/include/clang/Sema/Sema.h:1340