summaryrefslogtreecommitdiffstats
path: root/clang/AST/StmtIterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/AST/StmtIterator.cpp')
-rw-r--r--clang/AST/StmtIterator.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/AST/StmtIterator.cpp b/clang/AST/StmtIterator.cpp
new file mode 100644
index 00000000000..aca1f810958
--- /dev/null
+++ b/clang/AST/StmtIterator.cpp
@@ -0,0 +1,27 @@
+//===--- StmtIterator.cpp - Iterators for Statements ------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Ted Kremenek and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines internal methods for StmtIterator.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/AST/StmtIterator.h"
+#include "clang/AST/Stmt.h"
+#include "clang/AST/Decl.h"
+
+using namespace clang;
+
+void StmtIterator::NextDecl() { assert(false); }
+void StmtIterator::PrevDecl() { assert(false); }
+
+Stmt*& StmtIterator::GetInitializer() const {
+ assert (D && isa<VarDecl>(D));
+ assert (cast<VarDecl>(D)->Init);
+ return reinterpret_cast<Stmt*&>(cast<VarDecl>(D)->Init);
+}
OpenPOWER on IntegriCloud