From 0632dd6fe068011af5710c0d6a745724021ff620 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Mar 2009 06:47:16 +0000 Subject: [PATCH] eliminate unneeded iterator wrappers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67927 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Stmt.h | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h index 79b4a2956e..28822129e1 100644 --- a/include/clang/AST/Stmt.h +++ b/include/clang/AST/Stmt.h @@ -260,37 +260,8 @@ public: virtual child_iterator child_begin(); virtual child_iterator child_end(); - class decl_iterator { - DeclGroupRef::iterator I; - public: - decl_iterator(DeclGroupRef::iterator i) : I(i) {} - decl_iterator& operator++() { ++I; return *this; } - bool operator==(const decl_iterator& R) const { - return R.I == I; - } - bool operator!=(const decl_iterator& R) const { - return R.I != I; - } - Decl* operator*() const { - return *I; - } - }; - - class const_decl_iterator { - DeclGroupRef::const_iterator I; - public: - const_decl_iterator(DeclGroupRef::const_iterator i) : I(i) {} - const_decl_iterator& operator++() { ++I; return *this; } - bool operator==(const const_decl_iterator& R) const { - return R.I == I; - } - bool operator!=(const const_decl_iterator& R) const { - return R.I != I; - } - Decl* operator*() const { - return *I; - } - }; + typedef DeclGroupRef::iterator decl_iterator; + typedef DeclGroupRef::const_iterator const_decl_iterator; decl_iterator decl_begin() { return DG.begin(); } decl_iterator decl_end() { return DG.end(); } -- 2.40.0