class ObjCAtTryStmt

Declaration

class ObjCAtTryStmt : public Stmt, private TrailingObjects { /* full declaration omitted */ };

Description

Represents Objective-C's @ try ... @ catch ... @ finally statement.

Declared at: clang/include/clang/AST/StmtObjC.h:165

Inherits from: Stmt, TrailingObjects

Member Variables

private clang::SourceLocation AtTryLoc
private unsigned int NumCatchStmts
private bool HasFinally

Inherited from Stmt:

protected

Method Overview

  • public static clang::ObjCAtTryStmt * Create(const clang::ASTContext & Context, clang::SourceLocation atTryLoc, clang::Stmt * atTryStmt, clang::Stmt ** CatchStmts, unsigned int NumCatchStmts, clang::Stmt * atFinallyStmt)
  • public static clang::ObjCAtTryStmt * CreateEmpty(const clang::ASTContext & Context, unsigned int NumCatchStmts, bool HasFinally)
  • private ObjCAtTryStmt(clang::SourceLocation atTryLoc, clang::Stmt * atTryStmt, clang::Stmt ** CatchStmts, unsigned int NumCatchStmts, clang::Stmt * atFinallyStmt)
  • private ObjCAtTryStmt(clang::Stmt::EmptyShell Empty, unsigned int NumCatchStmts, bool HasFinally)
  • public clang::ObjCAtTryStmt::catch_const_range catch_stmts() const
  • public clang::ObjCAtTryStmt::catch_range catch_stmts()
  • public clang::ObjCAtTryStmt::catch_stmt_iterator catch_stmts_begin()
  • public clang::ObjCAtTryStmt::const_catch_stmt_iterator catch_stmts_begin() const
  • public clang::ObjCAtTryStmt::const_catch_stmt_iterator catch_stmts_end() const
  • public clang::ObjCAtTryStmt::catch_stmt_iterator catch_stmts_end()
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getAtTryLoc() const
  • public clang::SourceLocation getBeginLoc() const
  • public const clang::ObjCAtCatchStmt * getCatchStmt(unsigned int I) const
  • public clang::ObjCAtCatchStmt * getCatchStmt(unsigned int I)
  • public clang::SourceLocation getEndLoc() const
  • public const clang::ObjCAtFinallyStmt * getFinallyStmt() const
  • public clang::ObjCAtFinallyStmt * getFinallyStmt()
  • public unsigned int getNumCatchStmts() const
  • private clang::Stmt ** getStmts()
  • private clang::Stmt *const * getStmts() const
  • public clang::Stmt * getTryBody()
  • public const clang::Stmt * getTryBody() const
  • private size_t numTrailingObjects(OverloadToken<clang::Stmt *>) const
  • public void setAtTryLoc(clang::SourceLocation Loc)
  • public void setCatchStmt(unsigned int I, clang::ObjCAtCatchStmt * S)
  • public void setFinallyStmt(clang::Stmt * S)
  • public void setTryBody(clang::Stmt * S)

Inherited from Stmt:

Methods

static clang::ObjCAtTryStmt* Create(
    const clang::ASTContext& Context,
    clang::SourceLocation atTryLoc,
    clang::Stmt* atTryStmt,
    clang::Stmt** CatchStmts,
    unsigned int NumCatchStmts,
    clang::Stmt* atFinallyStmt)

Declared at: clang/include/clang/AST/StmtObjC.h:200

Parameters

const clang::ASTContext& Context
clang::SourceLocation atTryLoc
clang::Stmt* atTryStmt
clang::Stmt** CatchStmts
unsigned int NumCatchStmts
clang::Stmt* atFinallyStmt

static clang::ObjCAtTryStmt* CreateEmpty(
    const clang::ASTContext& Context,
    unsigned int NumCatchStmts,
    bool HasFinally)

Declared at: clang/include/clang/AST/StmtObjC.h:204

Parameters

const clang::ASTContext& Context
unsigned int NumCatchStmts
bool HasFinally

ObjCAtTryStmt(clang::SourceLocation atTryLoc,
              clang::Stmt* atTryStmt,
              clang::Stmt** CatchStmts,
              unsigned int NumCatchStmts,
              clang::Stmt* atFinallyStmt)

Declared at: clang/include/clang/AST/StmtObjC.h:190

Parameters

clang::SourceLocation atTryLoc
clang::Stmt* atTryStmt
clang::Stmt** CatchStmts
unsigned int NumCatchStmts
clang::Stmt* atFinallyStmt

ObjCAtTryStmt(clang::Stmt::EmptyShell Empty,
              unsigned int NumCatchStmts,
              bool HasFinally)

Declared at: clang/include/clang/AST/StmtObjC.h:194

Parameters

clang::Stmt::EmptyShell Empty
unsigned int NumCatchStmts
bool HasFinally

clang::ObjCAtTryStmt::catch_const_range
catch_stmts() const

Declared at: clang/include/clang/AST/StmtObjC.h:289

clang::ObjCAtTryStmt::catch_range catch_stmts()

Declared at: clang/include/clang/AST/StmtObjC.h:281

clang::ObjCAtTryStmt::catch_stmt_iterator
catch_stmts_begin()

Declared at: clang/include/clang/AST/StmtObjC.h:277

clang::ObjCAtTryStmt::const_catch_stmt_iterator
catch_stmts_begin() const

Declared at: clang/include/clang/AST/StmtObjC.h:285

clang::ObjCAtTryStmt::const_catch_stmt_iterator
catch_stmts_end() const

Declared at: clang/include/clang/AST/StmtObjC.h:286

clang::ObjCAtTryStmt::catch_stmt_iterator
catch_stmts_end()

Declared at: clang/include/clang/AST/StmtObjC.h:278

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/StmtObjC.h:268

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/StmtObjC.h:263

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

Declared at: clang/include/clang/AST/StmtObjC.h:259

Parameters

const clang::Stmt* T

clang::SourceLocation getAtTryLoc() const

Description

Retrieve the location of the @ in the @ try.

Declared at: clang/include/clang/AST/StmtObjC.h:208

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/StmtObjC.h:256

const clang::ObjCAtCatchStmt* getCatchStmt(
    unsigned int I) const

Description

Retrieve a @ catch statement.

Declared at: clang/include/clang/AST/StmtObjC.h:221

Parameters

unsigned int I

clang::ObjCAtCatchStmt* getCatchStmt(
    unsigned int I)

Description

Retrieve a @ catch statement.

Declared at: clang/include/clang/AST/StmtObjC.h:227

Parameters

unsigned int I

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/StmtObjC.h:257

const clang::ObjCAtFinallyStmt* getFinallyStmt()
    const

Description

Retrieve the @ finally statement, if any.

Declared at: clang/include/clang/AST/StmtObjC.h:239

clang::ObjCAtFinallyStmt* getFinallyStmt()

Declared at: clang/include/clang/AST/StmtObjC.h:245

unsigned int getNumCatchStmts() const

Description

Retrieve the number of @ catch statements in this try-catch-finally block.

Declared at: clang/include/clang/AST/StmtObjC.h:218

clang::Stmt** getStmts()

Description

Retrieve the statements that are stored after this @ try statement. The order of the statements in memory follows the order in the source, with the @ try body first, followed by the @ catch statements (if any) and, finally, the @ finally (if it exists).

Declared at: clang/include/clang/AST/StmtObjC.h:187

clang::Stmt* const* getStmts() const

Declared at: clang/include/clang/AST/StmtObjC.h:188

clang::Stmt* getTryBody()

Declared at: clang/include/clang/AST/StmtObjC.h:213

const clang::Stmt* getTryBody() const

Description

Retrieve the @ try body.

Declared at: clang/include/clang/AST/StmtObjC.h:212

size_t numTrailingObjects(
    OverloadToken<clang::Stmt*>) const

Declared at: clang/include/clang/AST/StmtObjC.h:169

Parameters

OverloadToken<clang::Stmt*>

void setAtTryLoc(clang::SourceLocation Loc)

Declared at: clang/include/clang/AST/StmtObjC.h:209

Parameters

clang::SourceLocation Loc

void setCatchStmt(unsigned int I,
                  clang::ObjCAtCatchStmt* S)

Description

Set a particular catch statement.

Declared at: clang/include/clang/AST/StmtObjC.h:233

Parameters

unsigned int I
clang::ObjCAtCatchStmt* S

void setFinallyStmt(clang::Stmt* S)

Declared at: clang/include/clang/AST/StmtObjC.h:251

Parameters

clang::Stmt* S

void setTryBody(clang::Stmt* S)

Declared at: clang/include/clang/AST/StmtObjC.h:214

Parameters

clang::Stmt* S