]> granicus.if.org Git - clang/commitdiff
Added accessors to CompoundStmt to retrieve the source locations for the
authorTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2007 00:08:50 +0000 (00:08 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 25 Oct 2007 00:08:50 +0000 (00:08 +0000)
left and right bracket.  This is useful for serialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43318 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Stmt.h

index e5cc11163f8d2a9a9f2896c627cbfa28b2db8dad..a73bd2e56eaad6ef2eed117c6d67c20cc7a37cd6 100644 (file)
@@ -189,7 +189,7 @@ public:
                SourceLocation LB, SourceLocation RB)
     : Stmt(CompoundStmtClass), Body(StmtStart, StmtStart+NumStmts),
       LBracLoc(LB), RBracLoc(RB) {}
-  
+    
   bool body_empty() const { return Body.empty(); }
   
   typedef llvm::SmallVector<Stmt*, 16>::iterator body_iterator;
@@ -216,6 +216,10 @@ public:
   virtual SourceRange getSourceRange() const { 
     return SourceRange(LBracLoc, RBracLoc); 
   }
+  
+  SourceLocation getLBracLoc() { return LBracLoc; }
+  SourceLocation getRBracLoc() { return RBracLoc; }
+  
   static bool classof(const Stmt *T) { 
     return T->getStmtClass() == CompoundStmtClass; 
   }