clang API Documentation
Represents a folding of a pack over an operator. More...
#include <ExprCXX.h>
Public Member Functions | |
CXXFoldExpr (QualType T, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Opcode, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc) | |
CXXFoldExpr (EmptyShell Empty) | |
Expr * | getLHS () const |
Expr * | getRHS () 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? | |
Expr * | getPattern () const |
Get the pattern, that is, the operand that contains an unexpanded pack. | |
Expr * | getInit () 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 |
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 )
clang::CXXFoldExpr::CXXFoldExpr | ( | QualType | T, |
SourceLocation | LParenLoc, | ||
Expr * | LHS, | ||
BinaryOperatorKind | Opcode, | ||
SourceLocation | EllipsisLoc, | ||
Expr * | RHS, | ||
SourceLocation | RParenLoc | ||
) | [inline] |
clang::CXXFoldExpr::CXXFoldExpr | ( | EmptyShell | Empty | ) | [inline] |
child_range clang::CXXFoldExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
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().
SourceLocation clang::CXXFoldExpr::getEllipsisLoc | ( | ) | const [inline] |
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().
SourceLocation clang::CXXFoldExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
SourceLocation clang::CXXFoldExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
BinaryOperatorKind clang::CXXFoldExpr::getOperator | ( | ) | const [inline] |
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().
bool clang::CXXFoldExpr::isLeftFold | ( | ) | const [inline] |
Does this produce a left-associated sequence of operators?
Definition at line 3866 of file ExprCXX.h.
References isRightFold().
Referenced by getInit(), and getPattern().
bool clang::CXXFoldExpr::isRightFold | ( | ) | const [inline] |
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().
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
friend class ASTStmtWriter [friend] |
Reimplemented from clang::Stmt.