From bfcb650e9647945815ef33937044fd61eca80f6b Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 4 Dec 2009 22:22:32 +0000 Subject: [PATCH] Add an easy accessor for the end of the try/catch statement. llvm-svn: 90604 --- clang/include/clang/AST/StmtCXX.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/AST/StmtCXX.h b/clang/include/clang/AST/StmtCXX.h index 64eea2429c5d..09ea4ca2101b 100644 --- a/clang/include/clang/AST/StmtCXX.h +++ b/clang/include/clang/AST/StmtCXX.h @@ -68,10 +68,11 @@ public: Stmt **handlers, unsigned numHandlers); virtual SourceRange getSourceRange() const { - return SourceRange(TryLoc, Stmts.back()->getLocEnd()); + return SourceRange(getTryLoc(), getEndLoc()); } SourceLocation getTryLoc() const { return TryLoc; } + SourceLocation getEndLoc() const { return Stmts.back()->getLocEnd(); } CompoundStmt *getTryBlock() { return llvm::cast(Stmts[0]); } const CompoundStmt *getTryBlock() const {