blob: aca1f8109586bbc0d74622e83474b31e5645e420 [file] [log] [blame]
Ted Kremenek9caf8b12007-10-18 00:24:38 +00001//===--- 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
18using namespace clang;
19
20void StmtIterator::NextDecl() { assert(false); }
21void StmtIterator::PrevDecl() { assert(false); }
22
23Stmt*& 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}