Add an easy accessor for the end of the try/catch statement.

llvm-svn: 90604
This commit is contained in:
Mike Stump 2009-12-04 22:22:32 +00:00
parent 050b812fe7
commit bfcb650e96
1 changed files with 2 additions and 1 deletions

View File

@ -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 {