clang  6.0.0svn
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 Member Functions

 ExpressionEvaluationContextRecord (ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, bool IsDecltype)
 
MangleNumberingContextgetMangleNumberingContext (ASTContext &Ctx)
 Retrieve the mangling numbering context, used to consistently number constructs like lambdas for mangling. More...
 
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...
 
llvm::SmallPtrSet< Expr *, 2 > 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...
 
std::unique_ptr< MangleNumberingContextMangleNumbering
 The context information used to mangle lambda expressions and block literals within this context. 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...
 

Detailed Description

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

Definition at line 937 of file Sema.h.

Constructor & Destructor Documentation

◆ ExpressionEvaluationContextRecord()

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

Definition at line 981 of file Sema.h.

Member Function Documentation

◆ getMangleNumberingContext()

MangleNumberingContext & Sema::ExpressionEvaluationContextRecord::getMangleNumberingContext ( ASTContext Ctx)

Retrieve the mangling numbering context, used to consistently number constructs like lambdas for mangling.

Definition at line 367 of file SemaLambda.cpp.

References clang::ASTContext::createMangleNumberingContext().

◆ isConstantEvaluated()

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

Definition at line 1000 of file Sema.h.

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

◆ isUnevaluated()

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

Definition at line 995 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 939 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 979 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 975 of file Sema.h.

◆ IsDecltype

bool clang::Sema::ExpressionEvaluationContextRecord::IsDecltype

Whether we are in a decltype expression.

Definition at line 945 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 959 of file Sema.h.

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

◆ MangleNumbering

std::unique_ptr<MangleNumberingContext> clang::Sema::ExpressionEvaluationContextRecord::MangleNumbering

The context information used to mangle lambda expressions and block literals within this context.

This mangling information is allocated lazily, since most contexts do not have lambda expressions or block literals.

Definition at line 971 of file Sema.h.

◆ 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 964 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 949 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 953 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 942 of file Sema.h.

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

◆ SavedMaybeODRUseExprs

llvm::SmallPtrSet<Expr*, 2> clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs

Definition at line 955 of file Sema.h.

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


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