diff options
author | Mike Stump <mrs@apple.com> | 2009-12-04 22:22:32 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-12-04 22:22:32 +0000 |
commit | be0ed67bc79e96c26cd0ad41dcfab5a5020ead51 (patch) | |
tree | a25c62b84fcdf8bdd941017a9dea86c56e5f0c76 | |
parent | 8477ee93c9d81d1b5fe321706ff95bcd219c744b (diff) |
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
-rw-r--r-- | include/clang/AST/StmtCXX.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<CompoundStmt>(Stmts[0]); } const CompoundStmt *getTryBlock() const { |