class ArrayInitLoopExpr

Declaration

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

Description

Represents a loop initializing the elements of an array. The need to initialize the elements of an array occurs in a number of contexts: * in the implicit copy/move constructor for a class with an array member * when a lambda-expression captures an array by value * when a decomposition declaration decomposes an array There are two subexpressions: a common expression (the source array) that is evaluated once up-front, and a per-element initializer that runs once for each array element. Within the per-element initializer, the common expression may be referenced via an OpaqueValueExpr, and the current index may be obtained via an ArrayInitIndexExpr.

Declared at: clang/include/clang/AST/Expr.h:5421

Inherits from: Expr

Member Variables

private clang::Stmt* [2] SubExprs

Inherited from Stmt:

protected

Method Overview

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

ArrayInitLoopExpr(clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/Expr.h:5424

Parameters

clang::Stmt::EmptyShell Empty

ArrayInitLoopExpr(clang::QualType T,
                  clang::Expr* CommonInit,
                  clang::Expr* ElementInit)

Declared at: clang/include/clang/AST/Expr.h:5428

Parameters

clang::QualType T
clang::Expr* CommonInit
clang::Expr* ElementInit

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:5459

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:5462

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

Declared at: clang/include/clang/AST/Expr.h:5448

Parameters

const clang::Stmt* S

llvm::APInt getArraySize() const

Declared at: clang/include/clang/AST/Expr.h:5443

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:5452

clang::OpaqueValueExpr* getCommonExpr() const

Description

Get the common subexpression shared by all initializations (the source array).

Declared at: clang/include/clang/AST/Expr.h:5436

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:5455

clang::Expr* getSubExpr() const

Description

Get the initializer to use for each array element.

Declared at: clang/include/clang/AST/Expr.h:5441