forked from OSchip/llvm-project
Add an easy accessor for the end of the try/catch statement.
llvm-svn: 90604
This commit is contained in:
parent
050b812fe7
commit
bfcb650e96
|
@ -68,10 +68,11 @@ public:
|
||||||
Stmt **handlers, unsigned numHandlers);
|
Stmt **handlers, unsigned numHandlers);
|
||||||
|
|
||||||
virtual SourceRange getSourceRange() const {
|
virtual SourceRange getSourceRange() const {
|
||||||
return SourceRange(TryLoc, Stmts.back()->getLocEnd());
|
return SourceRange(getTryLoc(), getEndLoc());
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLocation getTryLoc() const { return TryLoc; }
|
SourceLocation getTryLoc() const { return TryLoc; }
|
||||||
|
SourceLocation getEndLoc() const { return Stmts.back()->getLocEnd(); }
|
||||||
|
|
||||||
CompoundStmt *getTryBlock() { return llvm::cast<CompoundStmt>(Stmts[0]); }
|
CompoundStmt *getTryBlock() { return llvm::cast<CompoundStmt>(Stmts[0]); }
|
||||||
const CompoundStmt *getTryBlock() const {
|
const CompoundStmt *getTryBlock() const {
|
||||||
|
|
Loading…
Reference in New Issue