class ArraySubscriptExpr

Declaration

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

Description

ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.

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

Inherits from: Expr

Member Variables

private clang::Stmt* [2] SubExprs

Inherited from Stmt:

protected

Method Overview

  • public ArraySubscriptExpr(clang::Expr * lhs, clang::Expr * rhs, clang::QualType t, clang::ExprValueKind VK, clang::ExprObjectKind OK, clang::SourceLocation rbracketloc)
  • public ArraySubscriptExpr(clang::Stmt::EmptyShell Shell)
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::Expr * getBase()
  • public const clang::Expr * getBase() const
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getExprLoc() const
  • public clang::Expr * getIdx()
  • public const clang::Expr * getIdx() const
  • public const clang::Expr * getLHS() const
  • public clang::Expr * getLHS()
  • public clang::SourceLocation getRBracketLoc() const
  • public clang::Expr * getRHS()
  • public const clang::Expr * getRHS() const
  • private bool lhsIsBase() const
  • public void setLHS(clang::Expr * E)
  • public void setRBracketLoc(clang::SourceLocation L)
  • public void setRHS(clang::Expr * E)

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

ArraySubscriptExpr(
    clang::Expr* lhs,
    clang::Expr* rhs,
    clang::QualType t,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK,
    clang::SourceLocation rbracketloc)

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

Parameters

clang::Expr* lhs
clang::Expr* rhs
clang::QualType t
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::SourceLocation rbracketloc

ArraySubscriptExpr(clang::Stmt::EmptyShell Shell)

Description

Create an empty array subscript expression.

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

Parameters

clang::Stmt::EmptyShell Shell

clang::Stmt::const_child_range children() const

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

clang::Stmt::child_range children()

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

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

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

Parameters

const clang::Stmt* T

clang::Expr* getBase()

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

const clang::Expr* getBase() const

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

clang::SourceLocation getBeginLoc() const

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

clang::SourceLocation getEndLoc() const

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

clang::SourceLocation getExprLoc() const

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

clang::Expr* getIdx()

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

const clang::Expr* getIdx() const

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

const clang::Expr* getLHS() const

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

clang::Expr* getLHS()

Description

An array access can be written A[4] or 4[A] (both are equivalent). - getBase() and getIdx() always present the normalized view: A[4]. In this case getBase() returns "A" and getIdx() returns "4". - getLHS() and getRHS() present the syntactic view. e.g. for 4[A] getLHS() returns "4". Note: Because vector element access is also written A[4] we must predicate the format conversion in getBase and getIdx only on the the type of the RHS, as it is possible for the LHS to be a vector of integer type

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

clang::SourceLocation getRBracketLoc() const

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

clang::Expr* getRHS()

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

const clang::Expr* getRHS() const

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

bool lhsIsBase() const

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

void setLHS(clang::Expr* E)

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

Parameters

clang::Expr* E

void setRBracketLoc(clang::SourceLocation L)

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

Parameters

clang::SourceLocation L

void setRHS(clang::Expr* E)

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

Parameters

clang::Expr* E