[cfe-commits] r90604 - /cfe/trunk/include/clang/AST/StmtCXX.h

Mike Stump mrs at apple.com
Fri Dec 4 14:22:33 PST 2009


Author: mrs
Date: Fri Dec  4 16:22:32 2009
New Revision: 90604

URL: http://llvm.org/viewvc/llvm-project?rev=90604&view=rev
Log:
Add an easy accessor for the end of the try/catch statement.

Modified:
    cfe/trunk/include/clang/AST/StmtCXX.h

Modified: cfe/trunk/include/clang/AST/StmtCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtCXX.h?rev=90604&r1=90603&r2=90604&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/StmtCXX.h (original)
+++ cfe/trunk/include/clang/AST/StmtCXX.h Fri Dec  4 16:22:32 2009
@@ -68,10 +68,11 @@
              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 {





More information about the cfe-commits mailing list