clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::SizeOfPackExpr Class Reference

Represents an expression that computes the length of a parameter pack. More...

#include <ExprCXX.h>

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

List of all members.

Public Member Functions

 SizeOfPackExpr (QualType SizeType, SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc)
 Creates a value-dependent expression that computes the length of the given parameter pack.
 SizeOfPackExpr (QualType SizeType, SourceLocation OperatorLoc, NamedDecl *Pack, SourceLocation PackLoc, SourceLocation RParenLoc, unsigned Length)
 Creates an expression that computes the length of the given parameter pack, which is already known.
 SizeOfPackExpr (EmptyShell Empty)
 Create an empty expression.
SourceLocation getOperatorLoc () const
 Determine the location of the 'sizeof' keyword.
SourceLocation getPackLoc () const
 Determine the location of the parameter pack.
SourceLocation getRParenLoc () const
 Determine the location of the right parenthesis.
NamedDeclgetPack () const
 Retrieve the parameter pack.
unsigned getPackLength () const
 Retrieve the length of the parameter pack.
SourceRange getSourceRange () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const SizeOfPackExpr *)

Friends

class ASTStmtReader
class ASTStmtWriter

Detailed Description

Represents an expression that computes the length of a parameter pack.

 template<typename ...Types>
 struct count {
   static const unsigned value = sizeof...(Types);
 };

Definition at line 3399 of file ExprCXX.h.


Constructor & Destructor Documentation

clang::SizeOfPackExpr::SizeOfPackExpr ( QualType  SizeType,
SourceLocation  OperatorLoc,
NamedDecl Pack,
SourceLocation  PackLoc,
SourceLocation  RParenLoc 
) [inline]

Creates a value-dependent expression that computes the length of the given parameter pack.

Definition at line 3425 of file ExprCXX.h.

clang::SizeOfPackExpr::SizeOfPackExpr ( QualType  SizeType,
SourceLocation  OperatorLoc,
NamedDecl Pack,
SourceLocation  PackLoc,
SourceLocation  RParenLoc,
unsigned  Length 
) [inline]

Creates an expression that computes the length of the given parameter pack, which is already known.

Definition at line 3436 of file ExprCXX.h.

clang::SizeOfPackExpr::SizeOfPackExpr ( EmptyShell  Empty) [inline]

Create an empty expression.

Definition at line 3447 of file ExprCXX.h.


Member Function Documentation

child_range clang::SizeOfPackExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 3481 of file ExprCXX.h.

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

Reimplemented from clang::Expr.

Definition at line 3475 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

static bool clang::SizeOfPackExpr::classof ( const SizeOfPackExpr ) [inline, static]

Definition at line 3478 of file ExprCXX.h.

SourceLocation clang::SizeOfPackExpr::getOperatorLoc ( ) const [inline]

Determine the location of the 'sizeof' keyword.

Definition at line 3450 of file ExprCXX.h.

NamedDecl* clang::SizeOfPackExpr::getPack ( ) const [inline]

Retrieve the parameter pack.

Definition at line 3459 of file ExprCXX.h.

unsigned clang::SizeOfPackExpr::getPackLength ( ) const [inline]

Retrieve the length of the parameter pack.

This routine may only be invoked when the expression is not value-dependent.

Definition at line 3465 of file ExprCXX.h.

References clang::Expr::isValueDependent().

SourceLocation clang::SizeOfPackExpr::getPackLoc ( ) const [inline]

Determine the location of the parameter pack.

Definition at line 3453 of file ExprCXX.h.

SourceLocation clang::SizeOfPackExpr::getRParenLoc ( ) const [inline]

Determine the location of the right parenthesis.

Definition at line 3456 of file ExprCXX.h.

SourceRange clang::SizeOfPackExpr::getSourceRange ( ) const [inline]

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.

Reimplemented from clang::Stmt.

Definition at line 3471 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 3419 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 3420 of file ExprCXX.h.


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