clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::FunctionParmPackExpr Class Reference

Represents a reference to a function parameter pack that has been substituted but not yet expanded. More...

#include <ExprCXX.h>

Inheritance diagram for clang::FunctionParmPackExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::FunctionParmPackExpr:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ParmVarDecl *const * iterator
 Iterators over the parameters which the parameter pack expanded into.

Public Member Functions

ParmVarDeclgetParameterPack () const
 Get the parameter pack which this expression refers to.
SourceLocation getParameterPackLocation () const
 Get the location of the parameter pack.
iterator begin () const
iterator end () const
unsigned getNumExpansions () const
 Get the number of parameters in this parameter pack.
ParmVarDeclgetExpansion (unsigned I) const
 Get an expansion of the parameter pack by index.
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static FunctionParmPackExprCreate (const ASTContext &Context, QualType T, ParmVarDecl *ParamPack, SourceLocation NameLoc, ArrayRef< Decl * > Params)
static FunctionParmPackExprCreateEmpty (const ASTContext &Context, unsigned NumParams)
static bool classof (const Stmt *T)

Friends

class ASTReader
class ASTStmtReader

Detailed Description

Represents a reference to a function parameter pack that has been substituted but not yet expanded.

When a pack expansion contains multiple parameter packs at different levels, this node is used to represent a function parameter pack at an outer level which we have already substituted to refer to expanded parameters, but where the containing pack expansion cannot yet be expanded.

 template<typename...Ts> struct S {
   template<typename...Us> auto f(Ts ...ts) -> decltype(g(Us(ts)...));
 };
 template struct S<int, int>;

Definition at line 3659 of file ExprCXX.h.


Member Typedef Documentation

Iterators over the parameters which the parameter pack expanded into.

Definition at line 3692 of file ExprCXX.h.


Member Function Documentation

Definition at line 3693 of file ExprCXX.h.

Referenced by end(), and getExpansion().

Reimplemented from clang::Stmt.

Definition at line 3709 of file ExprCXX.h.

static bool clang::FunctionParmPackExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::Expr.

Definition at line 3705 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

FunctionParmPackExpr * FunctionParmPackExpr::Create ( const ASTContext Context,
QualType  T,
ParmVarDecl ParamPack,
SourceLocation  NameLoc,
ArrayRef< Decl * >  Params 
) [static]

Definition at line 1457 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

FunctionParmPackExpr * FunctionParmPackExpr::CreateEmpty ( const ASTContext Context,
unsigned  NumParams 
) [static]

Definition at line 1466 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

Definition at line 3694 of file ExprCXX.h.

References begin().

Get an expansion of the parameter pack by index.

Definition at line 3700 of file ExprCXX.h.

References begin().

Reimplemented from clang::Stmt.

Definition at line 3703 of file ExprCXX.h.

Reimplemented from clang::Stmt.

Definition at line 3702 of file ExprCXX.h.

Get the number of parameters in this parameter pack.

Definition at line 3697 of file ExprCXX.h.

Get the parameter pack which this expression refers to.

Definition at line 3685 of file ExprCXX.h.

Get the location of the parameter pack.

Definition at line 3688 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTReader [friend]

Definition at line 3673 of file ExprCXX.h.

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 3674 of file ExprCXX.h.


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