class InitializedEntity

Declaration

class InitializedEntity { /* full declaration omitted */ };

Description

Describes an entity that is being initialized.

Declared at: clang/include/clang/Sema/Initialization.h:47

Member Variables

private clang::InitializedEntity::EntityKind Kind
The kind of entity being initialized.
private const clang::InitializedEntity* Parent = nullptr
If non-NULL, the parent entity in which this initialization occurs.
private clang::QualType Type
The type of the object or reference being initialized.
private unsigned int ManglingNumber = 0
The mangling number for the next reference temporary to be created.
private anonymous struct / union

Method Overview

Methods

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

Description

Create the initialization entity for a base class subobject.

Declared at: clang/include/clang/Sema/Initialization.h:366

Parameters

clang::ASTContext& Context
const clang::CXXBaseSpecifier* Base
bool IsInheritedVirtualBase
const clang::InitializedEntity* Parent = nullptr

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

Description

Create the initialization entity for a structured binding.

Declared at: clang/include/clang/Sema/Initialization.h:405

Parameters

clang::VarDecl* Binding

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

Declared at: clang/include/clang/Sema/Initialization.h:309

Parameters

clang::SourceLocation BlockVarLoc
clang::QualType Type

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

Description

Create the entity for a compound literal initializer.

Declared at: clang/include/clang/Sema/Initialization.h:419

Parameters

clang::TypeSourceInfo* TSI

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

Description

Create the initialization entity for a delegated constructor.

Declared at: clang/include/clang/Sema/Initialization.h:371

Parameters

clang::QualType Type

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

Description

Create the initialization entity for an array element.

Declared at: clang/include/clang/Sema/Initialization.h:398

Parameters

clang::ASTContext& Context
unsigned int Index
const clang::InitializedEntity& Parent

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

Description

Create the initialization entity for an exception object.

Declared at: clang/include/clang/Sema/Initialization.h:321

Parameters

clang::SourceLocation ThrowLoc
clang::QualType Type

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

Description

Create the initialization entity for a lambda capture. \p VarID The name of the entity being captured, or nullptr for 'this'.

Declared at: clang/include/clang/Sema/Initialization.h:412

Parameters

clang::IdentifierInfo* VarID
clang::QualType FieldType
clang::SourceLocation Loc

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

Declared at: clang/include/clang/Sema/Initialization.h:314

Parameters

clang::SourceLocation BlockVarLoc
clang::QualType Type

static clang::InitializedEntity InitializeMember(
    clang::IndirectFieldDecl* Member,
    const clang::InitializedEntity* Parent =
        nullptr,
    bool Implicit = false)

Description

Create the initialization entity for a member subobject.

Declared at: clang/include/clang/Sema/Initialization.h:385

Parameters

clang::IndirectFieldDecl* Member
const clang::InitializedEntity* Parent = nullptr
bool Implicit = false

static clang::InitializedEntity InitializeMember(
    clang::FieldDecl* Member,
    const clang::InitializedEntity* Parent =
        nullptr,
    bool Implicit = false)

Description

Create the initialization entity for a member subobject.

Declared at: clang/include/clang/Sema/Initialization.h:377

Parameters

clang::FieldDecl* Member
const clang::InitializedEntity* Parent = nullptr
bool Implicit = false

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

Description

Create the initialization entity for a default member initializer.

Declared at: clang/include/clang/Sema/Initialization.h:393

Parameters

clang::FieldDecl* Member

static clang::InitializedEntity InitializeNew(
    clang::SourceLocation NewLoc,
    clang::QualType Type)

Description

Create the initialization entity for an object allocated via new.

Declared at: clang/include/clang/Sema/Initialization.h:327

Parameters

clang::SourceLocation NewLoc
clang::QualType Type

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

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:276

Parameters

clang::ASTContext& Context
clang::QualType Type
bool Consumed

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

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:261

Parameters

clang::ASTContext& Context
clang::ParmVarDecl* Parm
clang::QualType Type

static clang::InitializedEntity
InitializeParameter(clang::ASTContext& Context,
                    clang::ParmVarDecl* Parm)

Description

Create the initialization entity for a parameter.

Declared at: clang/include/clang/Sema/Initialization.h:253

Parameters

clang::ASTContext& Context
clang::ParmVarDecl* Parm

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

Description

Create the initialization entity for a related result.

Declared at: clang/include/clang/Sema/Initialization.h:357

Parameters

clang::ObjCMethodDecl* MD
clang::QualType Type

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

Description

Create the initialization entity for the result of a function.

Declared at: clang/include/clang/Sema/Initialization.h:299

Parameters

clang::SourceLocation ReturnLoc
clang::QualType Type

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

Declared at: clang/include/clang/Sema/Initialization.h:304

Parameters

clang::SourceLocation ReturnLoc
clang::QualType Type

static clang::InitializedEntity
InitializeTemplateParameter(
    clang::QualType T,
    clang::NonTypeTemplateParmDecl* Param)

Description

Create the initialization entity for a template parameter.

Declared at: clang/include/clang/Sema/Initialization.h:289

Parameters

clang::QualType T
clang::NonTypeTemplateParmDecl* Param

static clang::InitializedEntity
InitializeTemporary(clang::QualType Type)

Description

Create the initialization entity for a temporary.

Declared at: clang/include/clang/Sema/Initialization.h:332

Parameters

clang::QualType Type

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

Description

Create the initialization entity for a temporary.

Declared at: clang/include/clang/Sema/Initialization.h:337

Parameters

clang::ASTContext& Context
clang::TypeSourceInfo* TypeInfo

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

Description

Create the initialization entity for a temporary.

Declared at: clang/include/clang/Sema/Initialization.h:349

Parameters

clang::TypeSourceInfo* TypeInfo
clang::QualType Type

static clang::InitializedEntity
InitializeVariable(clang::VarDecl* Var)

Description

Create the initialization entity for a variable.

Declared at: clang/include/clang/Sema/Initialization.h:248

Parameters

clang::VarDecl* Var

InitializedEntity(
    clang::VarDecl* Var,
    clang::InitializedEntity::EntityKind EK =
        EK_Variable)

Description

Create the initialization entity for a variable.

Declared at: clang/include/clang/Sema/Initialization.h:214

Parameters

clang::VarDecl* Var
clang::InitializedEntity::EntityKind EK = EK_Variable

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

Description

Create the initialization entity for an array element.

Declared at: clang/include/clang/Sema/Initialization.h:235

Parameters

clang::ASTContext& Context
unsigned int Index
const clang::InitializedEntity& Parent

InitializedEntity(
    clang::FieldDecl* Member,
    const clang::InitializedEntity* Parent,
    bool Implicit,
    bool DefaultMemberInit)

Description

Create the initialization entity for a member subobject.

Declared at: clang/include/clang/Sema/Initialization.h:229

Parameters

clang::FieldDecl* Member
const clang::InitializedEntity* Parent
bool Implicit
bool DefaultMemberInit

InitializedEntity(
    clang::InitializedEntity::EntityKind Kind,
    clang::SourceLocation Loc,
    clang::QualType Type,
    bool NRVO = false)

Description

Create the initialization entity for the result of a function, throwing an object, performing an explicit cast, or initializing a parameter for which there is no declaration.

Declared at: clang/include/clang/Sema/Initialization.h:220

Parameters

clang::InitializedEntity::EntityKind Kind
clang::SourceLocation Loc
clang::QualType Type
bool NRVO = false

InitializedEntity()

Declared at: clang/include/clang/Sema/Initialization.h:211

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

Description

Create the initialization entity for a lambda capture.

Declared at: clang/include/clang/Sema/Initialization.h:239

Parameters

clang::IdentifierInfo* VarID
clang::QualType FieldType
clang::SourceLocation Loc

unsigned int allocateManglingNumber() const

Declared at: clang/include/clang/Sema/Initialization.h:553

bool allowsNRVO() const

Description

Determine whether this initialization allows the named return value optimization, which also applies to thrown objects.

Declared at: clang/include/clang/Sema/Initialization.h:458

void dump() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:557

unsigned int dumpImpl(llvm::raw_ostream& OS) const

Declared at: clang/include/clang/Sema/Initialization.h:560

Parameters

llvm::raw_ostream& OS

const clang::CXXBaseSpecifier* getBaseSpecifier()
    const

Description

Retrieve the base specifier.

Declared at: clang/include/clang/Sema/Initialization.h:477

clang::SourceLocation getCaptureLoc() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:544

llvm::StringRef getCapturedVarName() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:537

clang::ValueDecl* getDecl() const

Description

Retrieve the variable, parameter, or field being initialized.

Declared at: clang/include/clang/Sema/Initialization.h:451

unsigned int getElementIndex() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:522

clang::InitializedEntity::EntityKind getKind()
    const

Description

Determine the kind of initialization.

Declared at: clang/include/clang/Sema/Initialization.h:427

clang::ObjCMethodDecl* getMethodDecl() const

Description

Retrieve the ObjectiveC method being initialized.

Declared at: clang/include/clang/Sema/Initialization.h:454

clang::DeclarationName getName() const

Description

Retrieve the name of the entity being initialized.

Declared at: clang/include/clang/Sema/Initialization.h:447

const clang::InitializedEntity* getParent() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:432

clang::SourceLocation getReturnLoc() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:508

clang::SourceLocation getThrowLoc() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:515

clang::QualType getType() const

Description

Retrieve type being initialized.

Declared at: clang/include/clang/Sema/Initialization.h:435

clang::TypeSourceInfo* getTypeSourceInfo() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:439

bool isDefaultMemberInitializer() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:502

bool isImplicitMemberInitializer() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:496

bool isInheritedVirtualBase() const

Description

Return whether the base is an inherited virtual base.

Declared at: clang/include/clang/Sema/Initialization.h:483

bool isParamOrTemplateParamKind() const

Declared at: clang/include/clang/Sema/Initialization.h:465

bool isParameterConsumed() const

Description

Determine whether this initialization consumes the parameter.

Declared at: clang/include/clang/Sema/Initialization.h:471

bool isParameterKind() const

Declared at: clang/include/clang/Sema/Initialization.h:460

bool isVariableLengthArrayNew() const

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:489

void setElementIndex(unsigned int Index)

Description

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

Declared at: clang/include/clang/Sema/Initialization.h:530

Parameters

unsigned int Index

void setParameterCFAudited()

Declared at: clang/include/clang/Sema/Initialization.h:549