18 using namespace clang;
23 :
Stmt(ObjCForCollectionStmtClass) {
24 SubExprs[ELEM] = Elem;
25 SubExprs[COLLECTION] = Collect;
26 SubExprs[BODY] = Body;
32 Stmt **CatchStmts,
unsigned NumCatchStmts,
34 :
Stmt(ObjCAtTryStmtClass), AtTryLoc(atTryLoc),
35 NumCatchStmts(NumCatchStmts), HasFinally(atFinallyStmt !=
nullptr) {
36 Stmt **Stmts = getStmts();
38 for (
unsigned I = 0; I != NumCatchStmts; ++I)
39 Stmts[I + 1] = CatchStmts[I];
42 Stmts[NumCatchStmts + 1] = atFinallyStmt;
47 Stmt **CatchStmts,
unsigned NumCatchStmts,
48 Stmt *atFinallyStmt) {
51 (1 + NumCatchStmts + (atFinallyStmt !=
nullptr)) *
sizeof(
Stmt *);
53 return new (Mem)
ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts,
58 unsigned NumCatchStmts,
68 return getFinallyStmt()->getEndLoc();
70 return getCatchStmt(NumCatchStmts - 1)->getEndLoc();
71 return getTryBody()->getEndLoc();
Defines the clang::ASTContext interface.
Stmt - This represents one statement.
Defines the Objective-C statement AST node classes.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
SourceLocation getEndLoc() const LLVM_READONLY
This represents one expression.
ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body, SourceLocation FCL, SourceLocation RPL)
Encodes a location in the source.
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
A placeholder type used to construct an empty shell of a type, that will be filled in later (e...
void * Allocate(size_t Size, unsigned Align=8) const
Dataflow Directional Tag Classes.
Represents Objective-C's @try ... @catch ... @finally statement.
static ObjCAtTryStmt * Create(const ASTContext &Context, SourceLocation atTryLoc, Stmt *atTryStmt, Stmt **CatchStmts, unsigned NumCatchStmts, Stmt *atFinallyStmt)