clang API Documentation

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

Represents a folding of a pack over an operator. More...

#include <ExprCXX.h>

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

List of all members.

Public Member Functions

 CXXFoldExpr (QualType T, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
 CXXFoldExpr (EmptyShell Empty)
ExprgetLHS () const
ExprgetRHS () const
bool isRightFold () const
 Does this produce a right-associated sequence of operators?
bool isLeftFold () const
 Does this produce a left-associated sequence of operators?
ExprgetPattern () const
 Get the pattern, that is, the operand that contains an unexpanded pack.
ExprgetInit () const
 Get the operand that doesn't contain a pack, for a binary fold.
SourceLocation getEllipsisLoc () const
BinaryOperatorKind getOperator () const
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class ASTStmtWriter

Detailed Description

Represents a folding of a pack over an operator.

This expression is always dependent and represents a pack expansion of the forms:

( expr op ... ) ( ... op expr ) ( expr op ... op expr )

Definition at line 3835 of file ExprCXX.h.


Constructor & Destructor Documentation

clang::CXXFoldExpr::CXXFoldExpr ( QualType  T,
SourceLocation  LParenLoc,
Expr LHS,
BinaryOperatorKind  Opcode,
SourceLocation  EllipsisLoc,
Expr RHS,
SourceLocation  RParenLoc 
) [inline]

Definition at line 3845 of file ExprCXX.h.

Definition at line 3856 of file ExprCXX.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 3887 of file ExprCXX.h.

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

Reimplemented from clang::Expr.

Definition at line 3882 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

Definition at line 3872 of file ExprCXX.h.

Expr* clang::CXXFoldExpr::getInit ( ) const [inline]

Get the operand that doesn't contain a pack, for a binary fold.

Definition at line 3870 of file ExprCXX.h.

References getLHS(), getRHS(), and isLeftFold().

Expr* clang::CXXFoldExpr::getLHS ( ) const [inline]

Definition at line 3858 of file ExprCXX.h.

Referenced by getInit(), getPattern(), and isRightFold().

Reimplemented from clang::Stmt.

Definition at line 3878 of file ExprCXX.h.

Reimplemented from clang::Stmt.

Definition at line 3875 of file ExprCXX.h.

Definition at line 3873 of file ExprCXX.h.

Expr* clang::CXXFoldExpr::getPattern ( ) const [inline]

Get the pattern, that is, the operand that contains an unexpanded pack.

Definition at line 3868 of file ExprCXX.h.

References getLHS(), getRHS(), and isLeftFold().

Expr* clang::CXXFoldExpr::getRHS ( ) const [inline]

Definition at line 3859 of file ExprCXX.h.

Referenced by getInit(), and getPattern().

Does this produce a left-associated sequence of operators?

Definition at line 3866 of file ExprCXX.h.

References isRightFold().

Referenced by getInit(), and getPattern().

Does this produce a right-associated sequence of operators?

Definition at line 3862 of file ExprCXX.h.

References clang::Expr::containsUnexpandedParameterPack(), and getLHS().

Referenced by isLeftFold().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 3842 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 3843 of file ExprCXX.h.


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