[cfe-commits] r43318 - /cfe/trunk/include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Wed Oct 24 17:08:52 PDT 2007
Author: kremenek
Date: Wed Oct 24 19:08:50 2007
New Revision: 43318
URL: http://llvm.org/viewvc/llvm-project?rev=43318&view=rev
Log:
Added accessors to CompoundStmt to retrieve the source locations for the
left and right bracket. This is useful for serialization.
Modified:
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=43318&r1=43317&r2=43318&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Wed Oct 24 19:08:50 2007
@@ -189,7 +189,7 @@
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 @@
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;
}
More information about the cfe-commits
mailing list