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) {
50 totalSizeToAlloc<Stmt *>(1 + NumCatchStmts + (atFinallyStmt !=
nullptr));
51 void *Mem = Context.Allocate(Size,
alignof(ObjCAtTryStmt));
52 return new (Mem) ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts,
57 unsigned NumCatchStmts,
59 size_t Size = totalSizeToAlloc<Stmt *>(1 + NumCatchStmts + HasFinally);
60 void *Mem = Context.Allocate(Size,
alignof(ObjCAtTryStmt));
61 return new (Mem) ObjCAtTryStmt(
EmptyShell(), NumCatchStmts, HasFinally);
Defines the clang::ASTContext interface.
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 ...
This represents one expression.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getEndLoc() const LLVM_READONLY
const ObjCAtFinallyStmt * getFinallyStmt() const
Retrieve the @finally statement, if any.
static ObjCAtTryStmt * Create(const ASTContext &Context, SourceLocation atTryLoc, Stmt *atTryStmt, Stmt **CatchStmts, unsigned NumCatchStmts, Stmt *atFinallyStmt)
static ObjCAtTryStmt * CreateEmpty(const ASTContext &Context, unsigned NumCatchStmts, bool HasFinally)
const ObjCAtCatchStmt * getCatchStmt(unsigned I) const
Retrieve a @catch statement.
const Stmt * getTryBody() const
Retrieve the @try body.
SourceLocation getEndLoc() const LLVM_READONLY
ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body, SourceLocation FCL, SourceLocation RPL)
Encodes a location in the source.
Stmt - This represents one statement.
SourceLocation getEndLoc() const LLVM_READONLY
Stmt(StmtClass SC, EmptyShell)
Construct an empty statement.
The JSON file list parser is used to communicate input to InstallAPI.
nullptr
This class represents a compute construct, representing a 'Kind' of βparallelβ, 'serial',...
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....