class CXXConstructExpr

Declaration

class CXXConstructExpr : public Expr { /* full declaration omitted */ };

Description

Represents a call to a C++ constructor.

Declared at: clang/include/clang/AST/ExprCXX.h:1460

Inherits from: Expr

Member Variables

private clang::CXXConstructorDecl* Constructor
A pointer to the constructor which will be ultimately called.
private clang::SourceRange ParenOrBraceRange
private unsigned int NumArgs
The number of arguments.

Inherited from Stmt:

protected

Method Overview

  • protected CXXConstructExpr(clang::Stmt::StmtClass SC, clang::QualType Ty, clang::SourceLocation Loc, clang::CXXConstructorDecl * Ctor, bool Elidable, ArrayRef<clang::Expr *> Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, clang::CXXConstructExpr::ConstructionKind ConstructKind, clang::SourceRange ParenOrBraceRange)
  • protected CXXConstructExpr(clang::Stmt::StmtClass SC, clang::Stmt::EmptyShell Empty, unsigned int NumArgs)
  • public static clang::CXXConstructExpr * Create(const clang::ASTContext & Ctx, clang::QualType Ty, clang::SourceLocation Loc, clang::CXXConstructorDecl * Ctor, bool Elidable, ArrayRef<clang::Expr *> Args, bool HadMultipleCandidates, bool ListInitialization, bool StdInitListInitialization, bool ZeroInitialization, clang::CXXConstructExpr::ConstructionKind ConstructKind, clang::SourceRange ParenOrBraceRange)
  • public static clang::CXXConstructExpr * CreateEmpty(const clang::ASTContext & Ctx, unsigned int NumArgs)
  • public clang::CXXConstructExpr::arg_iterator arg_begin()
  • public clang::CXXConstructExpr::const_arg_iterator arg_begin() const
  • public clang::CXXConstructExpr::arg_iterator arg_end()
  • public clang::CXXConstructExpr::const_arg_iterator arg_end() const
  • public clang::CXXConstructExpr::arg_range arguments()
  • public clang::CXXConstructExpr::const_arg_range arguments() const
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::Expr * getArg(unsigned int Arg)
  • public const clang::Expr * getArg(unsigned int Arg) const
  • public const clang::Expr *const * getArgs() const
  • public clang::Expr ** getArgs()
  • public clang::SourceLocation getBeginLoc() const
  • public clang::CXXConstructExpr::ConstructionKind getConstructionKind() const
  • public clang::CXXConstructorDecl * getConstructor() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getLocation() const
  • public unsigned int getNumArgs() const
  • public clang::SourceRange getParenOrBraceRange() const
  • private const clang::Stmt *const * getTrailingArgs() const
  • private inline clang::Stmt ** getTrailingArgs()
  • public bool hadMultipleCandidates() const
  • public bool isElidable() const
  • public bool isListInitialization() const
  • public bool isStdInitListInitialization() const
  • public bool requiresZeroInitialization() const
  • public void setArg(unsigned int Arg, clang::Expr * ArgExpr)
  • public void setConstructionKind(clang::CXXConstructExpr::ConstructionKind CK)
  • public void setElidable(bool E)
  • public void setHadMultipleCandidates(bool V)
  • public void setListInitialization(bool V)
  • public void setLocation(clang::SourceLocation Loc)
  • public void setParenOrBraceRange(clang::SourceRange Range)
  • public void setRequiresZeroInitialization(bool ZeroInit)
  • public void setStdInitListInitialization(bool V)
  • protected static unsigned int sizeOfTrailingObjects(unsigned int NumArgs)

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXConstructExpr(
    clang::Stmt::StmtClass SC,
    clang::QualType Ty,
    clang::SourceLocation Loc,
    clang::CXXConstructorDecl* Ctor,
    bool Elidable,
    ArrayRef<clang::Expr*> Args,
    bool HadMultipleCandidates,
    bool ListInitialization,
    bool StdInitListInitialization,
    bool ZeroInitialization,
    clang::CXXConstructExpr::ConstructionKind
        ConstructKind,
    clang::SourceRange ParenOrBraceRange)

Description

Build a C++ construction expression.

Declared at: clang/include/clang/AST/ExprCXX.h:1503

Parameters

clang::Stmt::StmtClass SC
clang::QualType Ty
clang::SourceLocation Loc
clang::CXXConstructorDecl* Ctor
bool Elidable
ArrayRef<clang::Expr*> Args
bool HadMultipleCandidates
bool ListInitialization
bool StdInitListInitialization
bool ZeroInitialization
clang::CXXConstructExpr::ConstructionKind ConstructKind
clang::SourceRange ParenOrBraceRange

CXXConstructExpr(clang::Stmt::StmtClass SC,
                 clang::Stmt::EmptyShell Empty,
                 unsigned int NumArgs)

Description

Build an empty C++ construction expression.

Declared at: clang/include/clang/AST/ExprCXX.h:1511

Parameters

clang::Stmt::StmtClass SC
clang::Stmt::EmptyShell Empty
unsigned int NumArgs

static clang::CXXConstructExpr* Create(
    const clang::ASTContext& Ctx,
    clang::QualType Ty,
    clang::SourceLocation Loc,
    clang::CXXConstructorDecl* Ctor,
    bool Elidable,
    ArrayRef<clang::Expr*> Args,
    bool HadMultipleCandidates,
    bool ListInitialization,
    bool StdInitListInitialization,
    bool ZeroInitialization,
    clang::CXXConstructExpr::ConstructionKind
        ConstructKind,
    clang::SourceRange ParenOrBraceRange)

Description

Create a C++ construction expression.

Declared at: clang/include/clang/AST/ExprCXX.h:1522

Parameters

const clang::ASTContext& Ctx
clang::QualType Ty
clang::SourceLocation Loc
clang::CXXConstructorDecl* Ctor
bool Elidable
ArrayRef<clang::Expr*> Args
bool HadMultipleCandidates
bool ListInitialization
bool StdInitListInitialization
bool ZeroInitialization
clang::CXXConstructExpr::ConstructionKind ConstructKind
clang::SourceRange ParenOrBraceRange

static clang::CXXConstructExpr* CreateEmpty(
    const clang::ASTContext& Ctx,
    unsigned int NumArgs)

Description

Create an empty C++ construction expression.

Declared at: clang/include/clang/AST/ExprCXX.h:1529

Parameters

const clang::ASTContext& Ctx
unsigned int NumArgs

clang::CXXConstructExpr::arg_iterator arg_begin()

Declared at: clang/include/clang/AST/ExprCXX.h:1597

clang::CXXConstructExpr::const_arg_iterator
arg_begin() const

Declared at: clang/include/clang/AST/ExprCXX.h:1599

clang::CXXConstructExpr::arg_iterator arg_end()

Declared at: clang/include/clang/AST/ExprCXX.h:1598

clang::CXXConstructExpr::const_arg_iterator
arg_end() const

Declared at: clang/include/clang/AST/ExprCXX.h:1600

clang::CXXConstructExpr::arg_range arguments()

Declared at: clang/include/clang/AST/ExprCXX.h:1592

clang::CXXConstructExpr::const_arg_range
arguments() const

Declared at: clang/include/clang/AST/ExprCXX.h:1593

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/ExprCXX.h:1641

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/ExprCXX.h:1637

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/ExprCXX.h:1631

Parameters

const clang::Stmt* T

clang::Expr* getArg(unsigned int Arg)

Description

Return the specified argument.

Declared at: clang/include/clang/AST/ExprCXX.h:1611

Parameters

unsigned int Arg

const clang::Expr* getArg(unsigned int Arg) const

Declared at: clang/include/clang/AST/ExprCXX.h:1615

Parameters

unsigned int Arg

const clang::Expr* const* getArgs() const

Declared at: clang/include/clang/AST/ExprCXX.h:1603

clang::Expr** getArgs()

Declared at: clang/include/clang/AST/ExprCXX.h:1602

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:1626

clang::CXXConstructExpr::ConstructionKind
getConstructionKind() const

Description

Determine whether this constructor is actually constructing a base class (rather than a complete object).

Declared at: clang/include/clang/AST/ExprCXX.h:1580

clang::CXXConstructorDecl* getConstructor() const

Description

Get the constructor that this expression will (ultimately) call.

Declared at: clang/include/clang/AST/ExprCXX.h:1532

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:1627

clang::SourceLocation getLocation() const

Declared at: clang/include/clang/AST/ExprCXX.h:1534

unsigned int getNumArgs() const

Description

Return the number of arguments to the constructor call.

Declared at: clang/include/clang/AST/ExprCXX.h:1608

clang::SourceRange getParenOrBraceRange() const

Declared at: clang/include/clang/AST/ExprCXX.h:1628

const clang::Stmt* const* getTrailingArgs() const

Declared at: clang/include/clang/AST/ExprCXX.h:1497

inline clang::Stmt** getTrailingArgs()

Description

Return a pointer to the start of the trailing arguments. Defined just after CXXTemporaryObjectExpr.

Declared at: clang/include/clang/AST/ExprCXX.h:1496

bool hadMultipleCandidates() const

Description

Whether the referred constructor was resolved from an overloaded set having size greater than 1.

Declared at: clang/include/clang/AST/ExprCXX.h:1543

bool isElidable() const

Description

Whether this construction is elidable.

Declared at: clang/include/clang/AST/ExprCXX.h:1538

bool isListInitialization() const

Description

Whether this constructor call was written as list-initialization.

Declared at: clang/include/clang/AST/ExprCXX.h:1551

bool isStdInitListInitialization() const

Description

Whether this constructor call was written as list-initialization, but was interpreted as forming a std::initializer_list <T > from the list and passing that as a single constructor argument. See C++11 [over.match.list]p1 bullet 1.

Declared at: clang/include/clang/AST/ExprCXX.h:1562

bool requiresZeroInitialization() const

Description

Whether this construction first requires zero-initialization before the initializer is called.

Declared at: clang/include/clang/AST/ExprCXX.h:1571

void setArg(unsigned int Arg,
            clang::Expr* ArgExpr)

Description

Set the specified argument.

Declared at: clang/include/clang/AST/ExprCXX.h:1621

Parameters

unsigned int Arg
clang::Expr* ArgExpr

void setConstructionKind(
    clang::CXXConstructExpr::ConstructionKind CK)

Declared at: clang/include/clang/AST/ExprCXX.h:1583

Parameters

clang::CXXConstructExpr::ConstructionKind CK

void setElidable(bool E)

Declared at: clang/include/clang/AST/ExprCXX.h:1539

Parameters

bool E

void setHadMultipleCandidates(bool V)

Declared at: clang/include/clang/AST/ExprCXX.h:1546

Parameters

bool V

void setListInitialization(bool V)

Declared at: clang/include/clang/AST/ExprCXX.h:1554

Parameters

bool V

void setLocation(clang::SourceLocation Loc)

Declared at: clang/include/clang/AST/ExprCXX.h:1535

Parameters

clang::SourceLocation Loc

void setParenOrBraceRange(
    clang::SourceRange Range)

Declared at: clang/include/clang/AST/ExprCXX.h:1629

Parameters

clang::SourceRange Range

void setRequiresZeroInitialization(bool ZeroInit)

Declared at: clang/include/clang/AST/ExprCXX.h:1574

Parameters

bool ZeroInit

void setStdInitListInitialization(bool V)

Declared at: clang/include/clang/AST/ExprCXX.h:1565

Parameters

bool V

static unsigned int sizeOfTrailingObjects(
    unsigned int NumArgs)

Description

Return the size in bytes of the trailing objects. Used by CXXTemporaryObjectExpr to allocate the right amount of storage.

Declared at: clang/include/clang/AST/ExprCXX.h:1515

Parameters

unsigned int NumArgs