clang 23.0.0git
clang::InitializedEntity Class Reference

Describes an entity that is being initialized. More...

#include "clang/Sema/Initialization.h"

Public Types

enum  EntityKind {
  EK_Variable , EK_Parameter , EK_TemplateParameter , EK_Result ,
  EK_StmtExprResult , EK_Exception , EK_Member , EK_ArrayElement ,
  EK_New , EK_Temporary , EK_Base , EK_Delegating ,
  EK_VectorElement , EK_MatrixElement , EK_BlockElement , EK_LambdaToBlockConversionBlockElement ,
  EK_ComplexElement , EK_LambdaCapture , EK_CompoundLiteralInit , EK_RelatedResult ,
  EK_Parameter_CF_Audited , EK_Binding , EK_ParenAggInitMember
}
 Specifies the kind of entity being initialized. More...
enum class  NRVOKind : uint8_t { Forbidden , Allowed }
enum class  NewArrayKind : uint8_t { KnownLength , UnknownLength }
enum class  FieldInitKind : uint8_t { Normal , ImplicitField , DefaultMember , ParenAgg }

Public Member Functions

EntityKind getKind () const
 Determine the kind of initialization.
const InitializedEntitygetParent () const
 Retrieve the parent of the entity being initialized, when the initialization itself is occurring within the context of a larger initialization.
QualType getType () const
 Retrieve type being initialized.
TypeSourceInfogetTypeSourceInfo () const
 Retrieve complete type-source information for the object being constructed, if known.
DeclarationName getName () const
 Retrieve the name of the entity being initialized.
ValueDeclgetDecl () const
 Retrieve the variable, parameter, or field being initialized.
ObjCMethodDeclgetMethodDecl () const
 Retrieve the ObjectiveC method being initialized.
bool allowsNRVO () const
 Determine whether this initialization allows the named return value optimization, which also applies to thrown objects.
bool isParameterKind () const
bool isParamOrTemplateParamKind () const
bool isParameterConsumed () const
 Determine whether this initialization consumes the parameter.
const CXXBaseSpecifiergetBaseSpecifier () const
 Retrieve the base specifier.
bool isInheritedVirtualBase () const
 Return whether the base is an inherited virtual base.
bool isVariableLengthArrayNew () const
 Determine whether this is an array new with an unknown bound.
bool isImplicitMemberInitializer () const
 Is this the implicit initialization of a member of a class from a defaulted constructor?
bool isDefaultMemberInitializer () const
 Is this the default member initializer of a member (specified inside the class definition)?
SourceLocation getReturnLoc () const
 Determine the location of the 'return' keyword when initializing the result of a function call.
SourceLocation getThrowLoc () const
 Determine the location of the 'throw' keyword when initializing an exception object.
unsigned getElementIndex () const
 If this is an array, vector, or complex number element, get the element's index.
void setElementIndex (unsigned Index)
 If this is already the initializer for an array or vector element, sets the element index.
StringRef getCapturedVarName () const
 For a lambda capture, return the capture's name.
SourceLocation getCaptureLoc () const
 Determine the location of the capture when initializing field from a captured variable in a lambda.
void setParameterCFAudited ()
unsigned allocateManglingNumber () const
void dump () const
 Dump a representation of the initialized entity to standard error, for debugging purposes.

Static Public Member Functions

static InitializedEntity InitializeVariable (VarDecl *Var)
 Create the initialization entity for a variable.
static InitializedEntity InitializeParameter (ASTContext &Context, ParmVarDecl *Parm)
 Create the initialization entity for a parameter.
static InitializedEntity InitializeParameter (ASTContext &Context, ParmVarDecl *Parm, QualType Type)
 Create the initialization entity for a parameter, but use another type.
static InitializedEntity InitializeParameter (ASTContext &Context, QualType Type, bool Consumed)
 Create the initialization entity for a parameter that is only known by its type.
static InitializedEntity InitializeTemplateParameter (QualType T, NamedDecl *Param)
 Create the initialization entity for a template parameter.
static InitializedEntity InitializeResult (SourceLocation ReturnLoc, QualType Type)
 Create the initialization entity for the result of a function.
static InitializedEntity InitializeStmtExprResult (SourceLocation ReturnLoc, QualType Type)
static InitializedEntity InitializeBlock (SourceLocation BlockVarLoc, QualType Type)
static InitializedEntity InitializeLambdaToBlock (SourceLocation BlockVarLoc, QualType Type)
static InitializedEntity InitializeException (SourceLocation ThrowLoc, QualType Type)
 Create the initialization entity for an exception object.
static InitializedEntity InitializeNew (SourceLocation NewLoc, QualType Type, NewArrayKind IsVariableLengthArrayNew)
 Create the initialization entity for an object allocated via new.
static InitializedEntity InitializeTemporary (QualType Type)
 Create the initialization entity for a temporary.
static InitializedEntity InitializeTemporary (ASTContext &Context, TypeSourceInfo *TypeInfo)
 Create the initialization entity for a temporary.
static InitializedEntity InitializeTemporary (TypeSourceInfo *TypeInfo, QualType Type)
 Create the initialization entity for a temporary.
static InitializedEntity InitializeRelatedResult (ObjCMethodDecl *MD, QualType Type)
 Create the initialization entity for a related result.
static InitializedEntity InitializeBase (ASTContext &Context, const CXXBaseSpecifier *Base, bool IsInheritedVirtualBase, const InitializedEntity *Parent=nullptr)
 Create the initialization entity for a base class subobject.
static InitializedEntity InitializeDelegation (QualType Type)
 Create the initialization entity for a delegated constructor.
static InitializedEntity InitializeMember (FieldDecl *Member, const InitializedEntity *Parent=nullptr)
 Create the initialization entity for a member subobject.
static InitializedEntity InitializeMember (IndirectFieldDecl *Member, const InitializedEntity *Parent=nullptr)
 Create the initialization entity for a member subobject.
static InitializedEntity InitializeMemberImplicit (FieldDecl *Member)
 Create the initialization entity for a member subobject with implicit field initializer.
static InitializedEntity InitializeMemberImplicit (IndirectFieldDecl *Member)
 Create the initialization entity for a member subobject with implicit field initializer.
static InitializedEntity InitializeMemberFromParenAggInit (FieldDecl *Member)
 Create the initialization entity for a member subobject initialized via parenthesized aggregate init.
static InitializedEntity InitializeMemberFromDefaultMemberInitializer (FieldDecl *Member)
 Create the initialization entity for a default member initializer.
static InitializedEntity InitializeElement (ASTContext &Context, unsigned Index, const InitializedEntity &Parent)
 Create the initialization entity for an array element.
static InitializedEntity InitializeBinding (VarDecl *Binding)
 Create the initialization entity for a structured binding.
static InitializedEntity InitializeLambdaCapture (IdentifierInfo *VarID, QualType FieldType, SourceLocation Loc)
 Create the initialization entity for a lambda capture.
static InitializedEntity InitializeCompoundLiteralInit (TypeSourceInfo *TSI)
 Create the entity for a compound literal initializer.

Detailed Description

Describes an entity that is being initialized.

Definition at line 47 of file Initialization.h.

Member Enumeration Documentation

◆ EntityKind

Specifies the kind of entity being initialized.

Enumerator
EK_Variable 

The entity being initialized is a variable.

EK_Parameter 

The entity being initialized is a function parameter.

EK_TemplateParameter 

The entity being initialized is a non-type template parameter.

EK_Result 

The entity being initialized is the result of a function call.

EK_StmtExprResult 

The entity being initialized is the result of a statement expression.

EK_Exception 

The entity being initialized is an exception object that is being thrown.

EK_Member 

The entity being initialized is a non-static data member subobject.

EK_ArrayElement 

The entity being initialized is an element of an array.

EK_New 

The entity being initialized is an object (or array of objects) allocated via new.

EK_Temporary 

The entity being initialized is a temporary object.

EK_Base 

The entity being initialized is a base member subobject.

EK_Delegating 

The initialization is being done by a delegating constructor.

EK_VectorElement 

The entity being initialized is an element of a vector.

or vector.

EK_MatrixElement 

The entity being initialized is an element of a matrix.

or matrix.

EK_BlockElement 

The entity being initialized is a field of block descriptor for the copied-in c++ object.

EK_LambdaToBlockConversionBlockElement 

The entity being initialized is a field of block descriptor for the copied-in lambda object that's used in the lambda to block conversion.

EK_ComplexElement 

The entity being initialized is the real or imaginary part of a complex number.

EK_LambdaCapture 

The entity being initialized is the field that captures a variable in a lambda.

EK_CompoundLiteralInit 

The entity being initialized is the initializer for a compound literal.

EK_RelatedResult 

The entity being implicitly initialized back to the formal result type.

EK_Parameter_CF_Audited 

The entity being initialized is a function parameter; function is member of group of audited CF APIs.

EK_Binding 

The entity being initialized is a structured binding of a decomposition declaration.

EK_ParenAggInitMember 

The entity being initialized is a non-static data member subobject of an object initialized via parenthesized aggregate initialization.

Definition at line 50 of file Initialization.h.

◆ FieldInitKind

enum class clang::InitializedEntity::FieldInitKind : uint8_t
strong
Enumerator
Normal 
ImplicitField 
DefaultMember 
ParenAgg 

Definition at line 146 of file Initialization.h.

◆ NewArrayKind

enum class clang::InitializedEntity::NewArrayKind : uint8_t
strong
Enumerator
KnownLength 
UnknownLength 

Definition at line 141 of file Initialization.h.

◆ NRVOKind

enum class clang::InitializedEntity::NRVOKind : uint8_t
strong
Enumerator
Forbidden 
Allowed 

Definition at line 139 of file Initialization.h.

Member Function Documentation

◆ allocateManglingNumber()

unsigned clang::InitializedEntity::allocateManglingNumber ( ) const
inline

◆ allowsNRVO()

◆ dump()

LLVM_DUMP_METHOD void InitializedEntity::dump ( ) const

Dump a representation of the initialized entity to standard error, for debugging purposes.

Definition at line 3931 of file SemaInit.cpp.

◆ getBaseSpecifier()

const CXXBaseSpecifier * clang::InitializedEntity::getBaseSpecifier ( ) const
inline

Retrieve the base specifier.

Definition at line 526 of file Initialization.h.

References Base, EK_Base, and getKind().

Referenced by clang::Sema::CheckConstructorAccess(), clang::InitializationSequence::Diagnose(), and PerformConstructorInitialization().

◆ getCapturedVarName()

StringRef clang::InitializedEntity::getCapturedVarName ( ) const
inline

For a lambda capture, return the capture's name.

Definition at line 588 of file Initialization.h.

References Capture, EK_LambdaCapture, and getKind().

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

◆ getCaptureLoc()

SourceLocation clang::InitializedEntity::getCaptureLoc ( ) const
inline

Determine the location of the capture when initializing field from a captured variable in a lambda.

Definition at line 595 of file Initialization.h.

References Capture, EK_LambdaCapture, and getKind().

Referenced by getInitializationLoc().

◆ getDecl()

◆ getElementIndex()

unsigned clang::InitializedEntity::getElementIndex ( ) const
inline

If this is an array, vector, or complex number element, get the element's index.

Definition at line 573 of file Initialization.h.

References EK_ArrayElement, EK_ComplexElement, EK_MatrixElement, EK_VectorElement, getKind(), and Index.

◆ getKind()

◆ getMethodDecl()

ObjCMethodDecl * clang::InitializedEntity::getMethodDecl ( ) const
inline

Retrieve the ObjectiveC method being initialized.

Definition at line 503 of file Initialization.h.

References MethodDecl.

◆ getName()

◆ getParent()

const InitializedEntity * clang::InitializedEntity::getParent ( ) const
inline

Retrieve the parent of the entity being initialized, when the initialization itself is occurring within the context of a larger initialization.

Definition at line 481 of file Initialization.h.

Referenced by canInitializeArrayWithEmbedDataString(), canPerformArrayCopy(), clang::Sema::CheckConstructorAccess(), clang::sema::checkExprLifetimeImpl(), CheckStringInit(), clang::sema::getEntityLifetime(), initializingConstexprVariable(), isIdiomaticBraceElisionEntity(), and warnBracedScalarInit().

◆ getReturnLoc()

SourceLocation clang::InitializedEntity::getReturnLoc ( ) const
inline

Determine the location of the 'return' keyword when initializing the result of a function call.

Definition at line 559 of file Initialization.h.

References EK_Result, getKind(), and LocAndNRVO.

Referenced by getInitializationLoc().

◆ getThrowLoc()

SourceLocation clang::InitializedEntity::getThrowLoc ( ) const
inline

Determine the location of the 'throw' keyword when initializing an exception object.

Definition at line 566 of file Initialization.h.

References EK_Exception, getKind(), and LocAndNRVO.

Referenced by getInitializationLoc().

◆ getType()

◆ getTypeSourceInfo()

TypeSourceInfo * clang::InitializedEntity::getTypeSourceInfo ( ) const
inline

Retrieve complete type-source information for the object being constructed, if known.

Definition at line 488 of file Initialization.h.

References EK_CompoundLiteralInit, EK_Temporary, and TypeInfo.

Referenced by clang::InitializationSequence::Perform(), and PerformConstructorInitialization().

◆ InitializeBase()

InitializedEntity InitializedEntity::InitializeBase ( ASTContext & Context,
const CXXBaseSpecifier * Base,
bool IsInheritedVirtualBase,
const InitializedEntity * Parent = nullptr )
static

Create the initialization entity for a base class subobject.

Definition at line 3760 of file SemaInit.cpp.

References Base, EK_Base, and clang::Result.

Referenced by clang::Sema::BuildBaseInitializer(), BuildImplicitBaseInitializer(), and TryOrBuildParenListInitialization().

◆ InitializeBinding()

InitializedEntity clang::InitializedEntity::InitializeBinding ( VarDecl * Binding)
inlinestatic

Create the initialization entity for a structured binding.

Definition at line 454 of file Initialization.h.

References EK_Binding.

Referenced by checkTupleLikeDecomposition().

◆ InitializeBlock()

InitializedEntity clang::InitializedEntity::InitializeBlock ( SourceLocation BlockVarLoc,
QualType Type )
inlinestatic

Definition at line 335 of file Initialization.h.

References EK_BlockElement.

Referenced by clang::Sema::ActOnBlockStmtExpr(), and checkEscapingByref().

◆ InitializeCompoundLiteralInit()

InitializedEntity clang::InitializedEntity::InitializeCompoundLiteralInit ( TypeSourceInfo * TSI)
inlinestatic

Create the entity for a compound literal initializer.

Definition at line 468 of file Initialization.h.

References EK_CompoundLiteralInit, clang::TypeSourceInfo::getType(), and clang::Result.

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

◆ InitializeDelegation()

InitializedEntity clang::InitializedEntity::InitializeDelegation ( QualType Type)
inlinestatic

Create the initialization entity for a delegated constructor.

Definition at line 400 of file Initialization.h.

References EK_Delegating.

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

◆ InitializeElement()

InitializedEntity clang::InitializedEntity::InitializeElement ( ASTContext & Context,
unsigned Index,
const InitializedEntity & Parent )
inlinestatic

Create the initialization entity for an array element.

Definition at line 447 of file Initialization.h.

References Index.

Referenced by clang::SemaOpenACC::CreateFirstPrivateInitRecipe(), TryArrayCopy(), and TryOrBuildParenListInitialization().

◆ InitializeException()

InitializedEntity clang::InitializedEntity::InitializeException ( SourceLocation ThrowLoc,
QualType Type )
inlinestatic

Create the initialization entity for an exception object.

Definition at line 347 of file Initialization.h.

References EK_Exception.

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

◆ InitializeLambdaCapture()

InitializedEntity clang::InitializedEntity::InitializeLambdaCapture ( IdentifierInfo * VarID,
QualType FieldType,
SourceLocation Loc )
inlinestatic

Create the initialization entity for a lambda capture.

VarID The name of the entity being captured, or nullptr for 'this'.

Definition at line 461 of file Initialization.h.

Referenced by clang::Sema::BuildCaptureInit(), and clang::Sema::buildLambdaInitCaptureInitialization().

◆ InitializeLambdaToBlock()

InitializedEntity clang::InitializedEntity::InitializeLambdaToBlock ( SourceLocation BlockVarLoc,
QualType Type )
inlinestatic

◆ InitializeMember() [1/2]

InitializedEntity clang::InitializedEntity::InitializeMember ( FieldDecl * Member,
const InitializedEntity * Parent = nullptr )
inlinestatic

Create the initialization entity for a member subobject.

Definition at line 406 of file Initialization.h.

References clang::Member, and Normal.

Referenced by clang::Sema::BuildMemberInitializer(), and clang::SemaObjC::SetIvarInitializers().

◆ InitializeMember() [2/2]

InitializedEntity clang::InitializedEntity::InitializeMember ( IndirectFieldDecl * Member,
const InitializedEntity * Parent = nullptr )
inlinestatic

Create the initialization entity for a member subobject.

Definition at line 413 of file Initialization.h.

References clang::Member, and Normal.

◆ InitializeMemberFromDefaultMemberInitializer()

InitializedEntity clang::InitializedEntity::InitializeMemberFromDefaultMemberInitializer ( FieldDecl * Member)
inlinestatic

Create the initialization entity for a default member initializer.

Definition at line 442 of file Initialization.h.

References DefaultMember, and clang::Member.

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

◆ InitializeMemberFromParenAggInit()

InitializedEntity clang::InitializedEntity::InitializeMemberFromParenAggInit ( FieldDecl * Member)
inlinestatic

Create the initialization entity for a member subobject initialized via parenthesized aggregate init.

Definition at line 435 of file Initialization.h.

References clang::Member, and ParenAgg.

Referenced by TryOrBuildParenListInitialization().

◆ InitializeMemberImplicit() [1/2]

InitializedEntity clang::InitializedEntity::InitializeMemberImplicit ( FieldDecl * Member)
inlinestatic

Create the initialization entity for a member subobject with implicit field initializer.

Definition at line 421 of file Initialization.h.

References ImplicitField, and clang::Member.

Referenced by BuildImplicitMemberInitializer(), and CollectFieldInitializer().

◆ InitializeMemberImplicit() [2/2]

InitializedEntity clang::InitializedEntity::InitializeMemberImplicit ( IndirectFieldDecl * Member)
inlinestatic

Create the initialization entity for a member subobject with implicit field initializer.

Definition at line 428 of file Initialization.h.

References ImplicitField, and clang::Member.

◆ InitializeNew()

InitializedEntity clang::InitializedEntity::InitializeNew ( SourceLocation NewLoc,
QualType Type,
NewArrayKind IsVariableLengthArrayNew )
inlinestatic

Create the initialization entity for an object allocated via new.

Definition at line 354 of file Initialization.h.

References EK_New, and Forbidden.

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

◆ InitializeParameter() [1/3]

◆ InitializeParameter() [2/3]

InitializedEntity clang::InitializedEntity::InitializeParameter ( ASTContext & Context,
ParmVarDecl * Parm,
QualType Type )
inlinestatic

Create the initialization entity for a parameter, but use another type.

Definition at line 287 of file Initialization.h.

References EK_Parameter, clang::Decl::hasAttr(), and Parameter.

◆ InitializeParameter() [3/3]

InitializedEntity clang::InitializedEntity::InitializeParameter ( ASTContext & Context,
QualType Type,
bool Consumed )
inlinestatic

Create the initialization entity for a parameter that is only known by its type.

Definition at line 302 of file Initialization.h.

References EK_Parameter, and Parameter.

◆ InitializeRelatedResult()

InitializedEntity clang::InitializedEntity::InitializeRelatedResult ( ObjCMethodDecl * MD,
QualType Type )
inlinestatic

Create the initialization entity for a related result.

Definition at line 386 of file Initialization.h.

References EK_RelatedResult, and clang::Result.

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

◆ InitializeResult()

InitializedEntity clang::InitializedEntity::InitializeResult ( SourceLocation ReturnLoc,
QualType Type )
inlinestatic

Create the initialization entity for the result of a function.

Definition at line 325 of file Initialization.h.

References EK_Result.

Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::SemaObjC::ActOnPropertyImplDecl(), and clang::Sema::BuildReturnStmt().

◆ InitializeStmtExprResult()

InitializedEntity clang::InitializedEntity::InitializeStmtExprResult ( SourceLocation ReturnLoc,
QualType Type )
inlinestatic

Definition at line 330 of file Initialization.h.

References EK_StmtExprResult.

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

◆ InitializeTemplateParameter()

InitializedEntity clang::InitializedEntity::InitializeTemplateParameter ( QualType T,
NamedDecl * Param )
inlinestatic

Create the initialization entity for a template parameter.

Definition at line 314 of file Initialization.h.

References EK_TemplateParameter, Normal, and Variable.

Referenced by BuildConvertedConstantExpression(), and clang::Sema::CheckTemplateArgument().

◆ InitializeTemporary() [1/3]

InitializedEntity clang::InitializedEntity::InitializeTemporary ( ASTContext & Context,
TypeSourceInfo * TypeInfo )
inlinestatic

Create the initialization entity for a temporary.

Definition at line 366 of file Initialization.h.

References InitializeTemporary(), clang::opencl_private, and TypeInfo.

◆ InitializeTemporary() [2/3]

◆ InitializeTemporary() [3/3]

InitializedEntity clang::InitializedEntity::InitializeTemporary ( TypeSourceInfo * TypeInfo,
QualType Type )
inlinestatic

Create the initialization entity for a temporary.

Definition at line 378 of file Initialization.h.

References EK_Temporary, clang::Result, and TypeInfo.

◆ InitializeVariable()

◆ isDefaultMemberInitializer()

bool clang::InitializedEntity::isDefaultMemberInitializer ( ) const
inline

Is this the default member initializer of a member (specified inside the class definition)?

Definition at line 552 of file Initialization.h.

References DefaultMember, EK_Member, getKind(), and Variable.

Referenced by clang::sema::getEntityLifetime().

◆ isImplicitMemberInitializer()

bool clang::InitializedEntity::isImplicitMemberInitializer ( ) const
inline

Is this the implicit initialization of a member of a class from a defaulted constructor?

Definition at line 545 of file Initialization.h.

References EK_Member, getKind(), ImplicitField, and Variable.

Referenced by canPerformArrayCopy().

◆ isInheritedVirtualBase()

bool clang::InitializedEntity::isInheritedVirtualBase ( ) const
inline

Return whether the base is an inherited virtual base.

Definition at line 532 of file Initialization.h.

References Base, EK_Base, and getKind().

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

◆ isParameterConsumed()

bool clang::InitializedEntity::isParameterConsumed ( ) const
inline

Determine whether this initialization consumes the parameter.

Definition at line 520 of file Initialization.h.

References isParameterKind(), and Parameter.

Referenced by MaybeProduceObjCObject().

◆ isParameterKind()

◆ isParamOrTemplateParamKind()

bool clang::InitializedEntity::isParamOrTemplateParamKind ( ) const
inline

◆ isVariableLengthArrayNew()

bool clang::InitializedEntity::isVariableLengthArrayNew ( ) const
inline

Determine whether this is an array new with an unknown bound.

Definition at line 538 of file Initialization.h.

References EK_New, getKind(), LocAndNRVO, and UnknownLength.

Referenced by TryOrBuildParenListInitialization().

◆ setElementIndex()

void clang::InitializedEntity::setElementIndex ( unsigned Index)
inline

If this is already the initializer for an array or vector element, sets the element index.

Definition at line 581 of file Initialization.h.

References EK_ArrayElement, EK_ComplexElement, EK_MatrixElement, EK_VectorElement, getKind(), and Index.

◆ setParameterCFAudited()

void clang::InitializedEntity::setParameterCFAudited ( )
inline

Definition at line 600 of file Initialization.h.

References EK_Parameter_CF_Audited.

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

Member Data Documentation

◆ Base

llvm::PointerIntPair<const CXXBaseSpecifier *, 1> clang::InitializedEntity::Base

When Kind == EK_Base, the base specifier that provides the base class.

The integer specifies whether the base is an inherited virtual base.

Definition at line 228 of file Initialization.h.

Referenced by getBaseSpecifier(), InitializeBase(), and isInheritedVirtualBase().

◆ Capture

struct C clang::InitializedEntity::Capture

Definition at line 235 of file Initialization.h.

Referenced by getCapturedVarName(), getCaptureLoc(), and getName().

◆ Index

unsigned clang::InitializedEntity::Index

When Kind == EK_ArrayElement, EK_VectorElement, EK_MatrixElement, or EK_ComplexElement, the index of the array or vector element being initialized.

Definition at line 233 of file Initialization.h.

Referenced by getElementIndex(), InitializeElement(), and setElementIndex().

◆ LocAndNRVO

struct LN clang::InitializedEntity::LocAndNRVO

Definition at line 223 of file Initialization.h.

Referenced by allowsNRVO(), getReturnLoc(), getThrowLoc(), and isVariableLengthArrayNew().

◆ MethodDecl

ObjCMethodDecl* clang::InitializedEntity::MethodDecl

When Kind == EK_RelatedResult, the ObjectiveC method where result type was implicitly changed to accommodate ARC semantics.

Definition at line 213 of file Initialization.h.

Referenced by getMethodDecl().

◆ Parameter

llvm::PointerIntPair<ParmVarDecl *, 1> clang::InitializedEntity::Parameter

When Kind == EK_Parameter, the ParmVarDecl, with the integer indicating whether the parameter is "consumed".

Definition at line 217 of file Initialization.h.

Referenced by getDecl(), getName(), InitializeParameter(), InitializeParameter(), and isParameterConsumed().

◆ TypeInfo

TypeSourceInfo* clang::InitializedEntity::TypeInfo

When Kind == EK_Temporary or EK_CompoundLiteralInit, the type source information for the temporary.

Definition at line 221 of file Initialization.h.

Referenced by getTypeSourceInfo(), InitializeTemporary(), and InitializeTemporary().

◆ Variable

VD clang::InitializedEntity::Variable

When Kind == EK_Variable, EK_Member, EK_Binding, or EK_TemplateParameter, the variable, binding, or template parameter.

Definition at line 209 of file Initialization.h.

Referenced by getDecl(), getName(), InitializeTemplateParameter(), isDefaultMemberInitializer(), and isImplicitMemberInitializer().


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