aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-10-25 00:08:50 +0000
committerTed Kremenek <kremenek@apple.com>2007-10-25 00:08:50 +0000
commit54395d440dc82a5e51b945c6c2a7f4bc4bea0358 (patch)
treeb6c0151151bbbfbcc65ed946908c336a005f215a
parentc5d3d72bac15dbf8044dfac3a5245e5e428bbabe (diff)
Added accessors to CompoundStmt to retrieve the source locations for the
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
-rw-r--r--include/clang/AST/Stmt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index e5cc11163f..a73bd2e56e 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -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;
}