[cfe-commits] r113800 - /cfe/trunk/include/clang/AST/DeclCXX.h
Ted Kremenek
kremenek at apple.com
Mon Sep 13 15:26:02 PDT 2010
Author: kremenek
Date: Mon Sep 13 17:26:02 2010
New Revision: 113800
URL: http://llvm.org/viewvc/llvm-project?rev=113800&view=rev
Log:
Add reverse iterator for initializers in constructor. Patch by Marcin Ĺwiderski!
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=113800&r1=113799&r2=113800&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Mon Sep 13 17:26:02 2010
@@ -1464,6 +1464,23 @@
return BaseOrMemberInitializers + NumBaseOrMemberInitializers;
}
+ typedef std::reverse_iterator<init_iterator> init_reverse_iterator;
+ typedef std::reverse_iterator<init_const_iterator> init_const_reverse_iterator;
+
+ init_reverse_iterator init_rbegin() {
+ return init_reverse_iterator(init_end());
+ }
+ init_const_reverse_iterator init_rbegin() const {
+ return init_const_reverse_iterator(init_end());
+ }
+
+ init_reverse_iterator init_rend() {
+ return init_reverse_iterator(init_begin());
+ }
+ init_const_reverse_iterator init_rend() const {
+ return init_const_reverse_iterator(init_begin());
+ }
+
/// getNumArgs - Determine the number of arguments used to
/// initialize the member or base.
unsigned getNumBaseOrMemberInitializers() const {
More information about the cfe-commits
mailing list