[cfe-commits] r67927 - /cfe/trunk/include/clang/AST/Stmt.h

Chris Lattner sabre at nondot.org
Fri Mar 27 23:47:16 PDT 2009


Author: lattner
Date: Sat Mar 28 01:47:16 2009
New Revision: 67927

URL: http://llvm.org/viewvc/llvm-project?rev=67927&view=rev
Log:
eliminate unneeded iterator wrappers.

Modified:
    cfe/trunk/include/clang/AST/Stmt.h

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=67927&r1=67926&r2=67927&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Sat Mar 28 01:47:16 2009
@@ -260,37 +260,8 @@
   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(); }





More information about the cfe-commits mailing list