clang API Documentation

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

#include <ExprObjC.h>

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

List of all members.

Public Member Functions

SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceRange getSourceRange () const LLVM_READONLY
Expr ** getElements ()
 Retrieve elements of array of literals.
const Expr *const * getElements () const
 Retrieve elements of array of literals.
unsigned getNumElements () const
 getNumElements - Return number of elements of objective-c array literal.
ExprgetElement (unsigned Index)
 getExpr - Return the Expr at the specified index.
const ExprgetElement (unsigned Index) const
ObjCMethodDeclgetArrayWithObjectsMethod () const
child_range children ()

Static Public Member Functions

static ObjCArrayLiteralCreate (const ASTContext &C, ArrayRef< Expr * > Elements, QualType T, ObjCMethodDecl *Method, SourceRange SR)
static ObjCArrayLiteralCreateEmpty (const ASTContext &C, unsigned NumElements)
static bool classof (const Stmt *T)

Friends

class ASTStmtReader

Detailed Description

ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];

Definition at line 133 of file ExprObjC.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 188 of file ExprObjC.h.

References getElements().

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

Reimplemented from clang::Expr.

Definition at line 158 of file ExprObjC.h.

References clang::Stmt::getStmtClass().

ObjCArrayLiteral * ObjCArrayLiteral::Create ( const ASTContext C,
ArrayRef< Expr * >  Elements,
QualType  T,
ObjCMethodDecl Method,
SourceRange  SR 
) [static]

Definition at line 4106 of file Expr.cpp.

References clang::ASTContext::Allocate().

Referenced by clang::Sema::BuildObjCArrayLiteral().

ObjCArrayLiteral * ObjCArrayLiteral::CreateEmpty ( const ASTContext C,
unsigned  NumElements 
) [static]

Definition at line 4115 of file Expr.cpp.

References clang::ASTContext::Allocate().

Definition at line 183 of file ExprObjC.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitObjCArrayLiteral().

getExpr - Return the Expr at the specified index.

Definition at line 174 of file ExprObjC.h.

References getElements().

Referenced by clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral().

const Expr* clang::ObjCArrayLiteral::getElement ( unsigned  Index) const [inline]

Definition at line 178 of file ExprObjC.h.

References getElements().

Retrieve elements of array of literals.

Definition at line 163 of file ExprObjC.h.

Referenced by children(), and getElement().

const Expr* const* clang::ObjCArrayLiteral::getElements ( ) const [inline]

Retrieve elements of array of literals.

Definition at line 166 of file ExprObjC.h.

Reimplemented from clang::Stmt.

Definition at line 155 of file ExprObjC.h.

References clang::SourceRange::getEnd().

Reimplemented from clang::Stmt.

Definition at line 154 of file ExprObjC.h.

References clang::SourceRange::getBegin().

getNumElements - Return number of elements of objective-c array literal.

Definition at line 171 of file ExprObjC.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral().

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 156 of file ExprObjC.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 193 of file ExprObjC.h.


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