clang API Documentation
Represents Objective-C's @try ... @catch ... @finally statement. More...
#include <StmtObjC.h>
Public Member Functions | |
SourceLocation | getAtTryLoc () const |
Retrieve the location of the @ in the @try. | |
void | setAtTryLoc (SourceLocation Loc) |
const Stmt * | getTryBody () const |
Retrieve the @try body. | |
Stmt * | getTryBody () |
void | setTryBody (Stmt *S) |
unsigned | getNumCatchStmts () const |
Retrieve the number of @catch statements in this try-catch-finally block. | |
const ObjCAtCatchStmt * | getCatchStmt (unsigned I) const |
Retrieve a @catch statement. | |
ObjCAtCatchStmt * | getCatchStmt (unsigned I) |
Retrieve a @catch statement. | |
void | setCatchStmt (unsigned I, ObjCAtCatchStmt *S) |
Set a particular catch statement. | |
const ObjCAtFinallyStmt * | getFinallyStmt () const |
Retrieve the @finally statement, if any. | |
ObjCAtFinallyStmt * | getFinallyStmt () |
void | setFinallyStmt (Stmt *S) |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
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) |
static bool | classof (const Stmt *T) |
Represents Objective-C's @try ... @catch ... @finally statement.
Definition at line 153 of file StmtObjC.h.
child_range clang::ObjCAtTryStmt::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
Definition at line 247 of file StmtObjC.h.
static bool clang::ObjCAtTryStmt::classof | ( | const Stmt * | T | ) | [inline, static] |
Definition at line 243 of file StmtObjC.h.
ObjCAtTryStmt * ObjCAtTryStmt::Create | ( | const ASTContext & | Context, |
SourceLocation | atTryLoc, | ||
Stmt * | atTryStmt, | ||
Stmt ** | CatchStmts, | ||
unsigned | NumCatchStmts, | ||
Stmt * | atFinallyStmt | ||
) | [static] |
Definition at line 786 of file Stmt.cpp.
References clang::ASTContext::Allocate().
Referenced by clang::Sema::ActOnObjCAtTryStmt().
ObjCAtTryStmt * ObjCAtTryStmt::CreateEmpty | ( | const ASTContext & | Context, |
unsigned | NumCatchStmts, | ||
bool | HasFinally | ||
) | [static] |
Definition at line 799 of file Stmt.cpp.
References clang::ASTContext::Allocate().
SourceLocation clang::ObjCAtTryStmt::getAtTryLoc | ( | ) | const [inline] |
Retrieve the location of the @ in the @try.
Definition at line 192 of file StmtObjC.h.
const ObjCAtCatchStmt* clang::ObjCAtTryStmt::getCatchStmt | ( | unsigned | I | ) | const [inline] |
Retrieve a @catch statement.
Definition at line 205 of file StmtObjC.h.
Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and getLocEnd().
ObjCAtCatchStmt* clang::ObjCAtTryStmt::getCatchStmt | ( | unsigned | I | ) | [inline] |
Retrieve a @catch statement.
Definition at line 211 of file StmtObjC.h.
const ObjCAtFinallyStmt* clang::ObjCAtTryStmt::getFinallyStmt | ( | ) | const [inline] |
Retrieve the @finally statement, if any.
Definition at line 223 of file StmtObjC.h.
Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and getLocEnd().
ObjCAtFinallyStmt* clang::ObjCAtTryStmt::getFinallyStmt | ( | ) | [inline] |
Definition at line 229 of file StmtObjC.h.
SourceLocation ObjCAtTryStmt::getLocEnd | ( | ) | const |
Reimplemented from clang::Stmt.
Definition at line 808 of file Stmt.cpp.
References getCatchStmt(), getFinallyStmt(), clang::ObjCAtCatchStmt::getLocEnd(), clang::ObjCAtFinallyStmt::getLocEnd(), clang::Stmt::getLocEnd(), and getTryBody().
SourceLocation clang::ObjCAtTryStmt::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Definition at line 240 of file StmtObjC.h.
unsigned clang::ObjCAtTryStmt::getNumCatchStmts | ( | ) | const [inline] |
Retrieve the number of @catch statements in this try-catch-finally block.
Definition at line 202 of file StmtObjC.h.
Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt().
const Stmt* clang::ObjCAtTryStmt::getTryBody | ( | ) | const [inline] |
Retrieve the @try body.
Definition at line 196 of file StmtObjC.h.
Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and getLocEnd().
Stmt* clang::ObjCAtTryStmt::getTryBody | ( | ) | [inline] |
Definition at line 197 of file StmtObjC.h.
void clang::ObjCAtTryStmt::setAtTryLoc | ( | SourceLocation | Loc | ) | [inline] |
Definition at line 193 of file StmtObjC.h.
void clang::ObjCAtTryStmt::setCatchStmt | ( | unsigned | I, |
ObjCAtCatchStmt * | S | ||
) | [inline] |
void clang::ObjCAtTryStmt::setFinallyStmt | ( | Stmt * | S | ) | [inline] |
Definition at line 235 of file StmtObjC.h.
References S.
void clang::ObjCAtTryStmt::setTryBody | ( | Stmt * | S | ) | [inline] |
Definition at line 198 of file StmtObjC.h.
References S.