[cfe-commits] r78578 - /cfe/trunk/include/clang/AST/DeclCXX.h

Mike Stump mrs at apple.com
Mon Aug 10 11:21:23 PDT 2009


Author: mrs
Date: Mon Aug 10 13:21:22 2009
New Revision: 78578

URL: http://llvm.org/viewvc/llvm-project?rev=78578&view=rev
Log:
Add walking bases in reverse order.

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

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

==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Mon Aug 10 13:21:22 2009
@@ -424,6 +424,18 @@
   base_class_const_iterator bases_begin() const { return Bases; }
   base_class_iterator       bases_end()         { return Bases + NumBases; }
   base_class_const_iterator bases_end()   const { return Bases + NumBases; }
+  reverse_base_class_iterator       bases_rbegin() {
+    return reverse_base_class_iterator(bases_end());
+  }
+  reverse_base_class_const_iterator bases_rbegin() const {
+    return reverse_base_class_const_iterator(bases_end());
+  }
+  reverse_base_class_iterator bases_rend() {
+    return reverse_base_class_iterator(bases_begin());
+  }
+  reverse_base_class_const_iterator bases_rend() const {
+    return reverse_base_class_const_iterator(bases_begin());
+  }
   
   /// getNumVBases - Retrieves the number of virtual base classes of this
   /// class.





More information about the cfe-commits mailing list