Ted Kremenek | 9caf8b1 | 2007-10-18 00:24:38 +0000 | [diff] [blame^] | 1 | //===--- StmtIterator.cpp - Iterators for Statements ------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by Ted Kremenek and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines internal methods for StmtIterator. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "clang/AST/StmtIterator.h" |
| 15 | #include "clang/AST/Stmt.h" |
| 16 | #include "clang/AST/Decl.h" |
| 17 | |
| 18 | using namespace clang; |
| 19 | |
| 20 | void StmtIterator::NextDecl() { assert(false); } |
| 21 | void StmtIterator::PrevDecl() { assert(false); } |
| 22 | |
| 23 | Stmt*& StmtIterator::GetInitializer() const { |
| 24 | assert (D && isa<VarDecl>(D)); |
| 25 | assert (cast<VarDecl>(D)->Init); |
| 26 | return reinterpret_cast<Stmt*&>(cast<VarDecl>(D)->Init); |
| 27 | } |