From 8aab17e82aab6b3f266ef1884253226d2cb8b8d8 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Sat, 3 Nov 2007 00:38:38 +0000 Subject: [PATCH] Provide both const and non-const accessor methods for @try and @finally ASTs. My previous patch did the same for @catch AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43654 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Stmt.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 50de8059a0..5ec8724f89 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -718,7 +718,8 @@ class ObjcAtFinallyStmt : public Stmt { : Stmt(ObjcAtFinallyStmtClass), AtFinallyStmt(atFinallyStmt), AtFinallyLoc(atFinallyLoc) {} - Stmt *getFinallyBody () const { return AtFinallyStmt; } + const Stmt *getFinallyBody () const { return AtFinallyStmt; } + Stmt *getFinallyBody () { return AtFinallyStmt; } virtual SourceRange getSourceRange() const { return SourceRange(AtFinallyLoc, AtFinallyStmt->getLocEnd()); @@ -754,9 +755,12 @@ public: SubStmts[END_TRY] = NULL; } - Stmt *getTryBody() const { return SubStmts[TRY]; } - Stmt *getCatchStmts() const { return SubStmts[CATCH]; } - Stmt *getFinallyStmt() const { return SubStmts[FINALLY]; } + const Stmt *getTryBody() const { return SubStmts[TRY]; } + Stmt *getTryBody() { return SubStmts[TRY]; } + const Stmt *getCatchStmts() const { return SubStmts[CATCH]; } + Stmt *getCatchStmts() { return SubStmts[CATCH]; } + const Stmt *getFinallyStmt() const { return SubStmts[FINALLY]; } + Stmt *getFinallyStmt() { return SubStmts[FINALLY]; } virtual SourceRange getSourceRange() const { return SourceRange(AtTryLoc, SubStmts[TRY]->getLocEnd()); -- 2.40.0