clang  10.0.0svn
Public Types | Public Member Functions | Public Attributes | List of all members
clang::Sema::ExpressionEvaluationContextRecord Struct Reference

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

#include "clang/Sema/Sema.h"

Collaboration diagram for clang::Sema::ExpressionEvaluationContextRecord:
Collaboration graph
[legend]

Public Types

enum  ExpressionKind { EK_Decltype, EK_TemplateArgument, EK_Other }
 Describes whether we are in an expression constext which we have to handle differently. More...
 

Public Member Functions

 ExpressionEvaluationContextRecord (ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, ExpressionKind ExprContext)
 
bool isUnevaluated () const
 
bool isConstantEvaluated () const
 

Public Attributes

ExpressionEvaluationContext Context
 The expression evaluation context. More...
 
CleanupInfo ParentCleanup
 Whether the enclosing context needed a cleanup. More...
 
bool IsDecltype
 Whether we are in a decltype expression. More...
 
unsigned NumCleanupObjects
 The number of active cleanup objects when we entered this expression evaluation context. More...
 
unsigned NumTypos
 The number of typos encountered during this expression evaluation context (i.e. More...
 
MaybeODRUseExprSet SavedMaybeODRUseExprs
 
SmallVector< LambdaExpr *, 2 > Lambdas
 The lambdas that are present within this context, if it is indeed an unevaluated context. More...
 
DeclManglingContextDecl
 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. More...
 
SmallVector< 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. More...
 
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
 If we are processing a decltype type, a set of temporary binding expressions for which we have deferred checking the destructor. More...
 
llvm::SmallPtrSet< const Expr *, 8 > PossibleDerefs
 
SmallVector< Expr *, 2 > VolatileAssignmentLHSs
 Expressions appearing as the LHS of a volatile assignment in this context. More...
 
enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext
 

Detailed Description

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

Definition at line 1024 of file Sema.h.

Member Enumeration Documentation

◆ ExpressionKind

Describes whether we are in an expression constext which we have to handle differently.

Enumerator
EK_Decltype 
EK_TemplateArgument 
EK_Other 

Definition at line 1070 of file Sema.h.

Constructor & Destructor Documentation

◆ ExpressionEvaluationContextRecord()

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

Definition at line 1074 of file Sema.h.

Member Function Documentation

◆ isConstantEvaluated()

bool clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated ( ) const
inline

Definition at line 1088 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ isUnevaluated()

bool clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated ( ) const
inline

Definition at line 1083 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

Member Data Documentation

◆ Context

ExpressionEvaluationContext clang::Sema::ExpressionEvaluationContextRecord::Context

The expression evaluation context.

Definition at line 1026 of file Sema.h.

◆ DelayedDecltypeBinds

SmallVector<CXXBindTemporaryExpr *, 8> clang::Sema::ExpressionEvaluationContextRecord::DelayedDecltypeBinds

If we are processing a decltype type, a set of temporary binding expressions for which we have deferred checking the destructor.

Definition at line 1059 of file Sema.h.

◆ DelayedDecltypeCalls

SmallVector<CallExpr *, 8> clang::Sema::ExpressionEvaluationContextRecord::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.

Definition at line 1055 of file Sema.h.

◆ ExprContext

enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind clang::Sema::ExpressionEvaluationContextRecord::ExprContext

◆ IsDecltype

bool clang::Sema::ExpressionEvaluationContextRecord::IsDecltype

Whether we are in a decltype expression.

Definition at line 1032 of file Sema.h.

◆ Lambdas

SmallVector<LambdaExpr *, 2> clang::Sema::ExpressionEvaluationContextRecord::Lambdas

The lambdas that are present within this context, if it is indeed an unevaluated context.

Definition at line 1046 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ ManglingContextDecl

Decl* clang::Sema::ExpressionEvaluationContextRecord::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.

Definition at line 1051 of file Sema.h.

◆ NumCleanupObjects

unsigned clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects

The number of active cleanup objects when we entered this expression evaluation context.

Definition at line 1036 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ NumTypos

unsigned clang::Sema::ExpressionEvaluationContextRecord::NumTypos

The number of typos encountered during this expression evaluation context (i.e.

the number of TypoExprs created).

Definition at line 1040 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ ParentCleanup

CleanupInfo clang::Sema::ExpressionEvaluationContextRecord::ParentCleanup

Whether the enclosing context needed a cleanup.

Definition at line 1029 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ PossibleDerefs

llvm::SmallPtrSet<const Expr *, 8> clang::Sema::ExpressionEvaluationContextRecord::PossibleDerefs

Definition at line 1061 of file Sema.h.

Referenced by clang::Sema::WarnOnPendingNoDerefs().

◆ SavedMaybeODRUseExprs

MaybeODRUseExprSet clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs

Definition at line 1042 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().

◆ VolatileAssignmentLHSs

SmallVector<Expr*, 2> clang::Sema::ExpressionEvaluationContextRecord::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.

Definition at line 1066 of file Sema.h.

Referenced by clang::Sema::PopExpressionEvaluationContext().


The documentation for this struct was generated from the following file: