14 #ifndef LLVM_CLANG_AST_STMTITERATOR_H
15 #define LLVM_CLANG_AST_STMTITERATOR_H
17 #include "llvm/Support/Compiler.h"
18 #include "llvm/Support/DataTypes.h"
28 class VariableArrayType;
63 void NextDecl(
bool ImmediateAdvance =
true);
76 template <
typename DERIVED,
typename REFERENCE>
78 public std::iterator<std::forward_iterator_tag,
80 REFERENCE, REFERENCE> {
97 return static_cast<DERIVED&
>(*this);
101 DERIVED tmp =
static_cast<DERIVED&
>(*this);
147 struct StmtRange : std::pair<StmtIterator,StmtIterator> {
152 bool empty()
const {
return first == second; }
159 assert(!
empty() &&
"incrementing on empty range");
165 assert(!
empty() &&
"incrementing on empty range");
195 bool empty()
const {
return first == second; }
202 assert(!
empty() &&
"incrementing on empty range");
208 assert(!
empty() &&
"incrementing on empty range");
ConstStmtIterator(const StmtIterator &RHS)
bool inSizeOfTypeVA() const
Stmt * operator->() const
StmtIteratorImpl(const VariableArrayType *t)
const Stmt * operator->() const
friend const StmtIterator & begin(const StmtRange &range)
const Stmt * operator*() const
Stmt *& operator*() const
void NextDecl(bool ImmediateAdvance=true)
friend const StmtIterator & end(const StmtRange &range)
ConstStmtRange & operator++()
StmtRange operator++(int)
StmtIteratorImpl(const StmtIteratorBase &RHS)
REFERENCE operator->() const
ConstStmtRange(const StmtRange &range)
bool operator==(const DERIVED &RHS) const
StmtIterator(Decl **dgi, Decl **dge)
Stmt *& GetDeclExpr() const
StmtIteratorBase(Stmt **s)
ConstStmtRange(const StmtIterator &begin, const StmtIterator &end)
StmtIterator(const VariableArrayType *t)
REFERENCE operator*() const
friend const ConstStmtIterator & begin(const ConstStmtRange &range)
friend const ConstStmtIterator & end(const ConstStmtRange &range)
ConstStmtRange(const ConstStmtIterator &begin, const ConstStmtIterator &end)
StmtIteratorImpl(Decl **dgi, Decl **dge)
bool operator!=(const DERIVED &RHS) const
const VariableArrayType * getVAPtr() const
StmtRange(const StmtIterator &begin, const StmtIterator &end)
void setVAPtr(const VariableArrayType *P)
ConstStmtRange operator++(int)
StmtIteratorImpl(Stmt **s)