From: Mike Stump Date: Fri, 4 Dec 2009 22:22:32 +0000 (+0000) Subject: Add an easy accessor for the end of the try/catch statement. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be0ed67bc79e96c26cd0ad41dcfab5a5020ead51;p=clang Add an easy accessor for the end of the try/catch statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90604 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/StmtCXX.h b/include/clang/AST/StmtCXX.h index 64eea2429c..09ea4ca210 100644 --- a/include/clang/AST/StmtCXX.h +++ b/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 {