ImmutableSet: Rename Self to SelfTy to make it more clear it is a type
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 15 Mar 2015 07:09:20 +0000 (07:09 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 15 Mar 2015 07:09:20 +0000 (07:09 +0000)
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232317 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/ImmutableSet.h

index a7444117b11601ed3b17df40456ffef37997930c..9a7362bfcdff1b7a705ddc1a3d685f0b4945fb4a 100644 (file)
@@ -652,7 +652,7 @@ public:
                    Flags=0x3 };
 
   typedef ImutAVLTree<ImutInfo> TreeTy;
-  typedef ImutAVLTreeGenericIterator<ImutInfo> Self;
+  typedef ImutAVLTreeGenericIterator<ImutInfo> SelfTy;
 
   ImutAVLTreeGenericIterator() {}
   ImutAVLTreeGenericIterator(const TreeTy *Root) {
@@ -693,11 +693,11 @@ public:
     }
   }
 
-  bool operator==(const Self &x) const { return stack == x.stack; }
+  bool operator==(const SelfTy &x) const { return stack == x.stack; }
 
-  bool operator!=(const Self &x) const { return !operator==(x); }
+  bool operator!=(const SelfTy &x) const { return !operator==(x); }
 
-  Self &operator++() {
+  SelfTy &operator++() {
     assert(!stack.empty());
     TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
     assert(Current);
@@ -723,7 +723,7 @@ public:
     return *this;
   }
 
-  Self &operator--() {
+  SelfTy &operator--() {
     assert(!stack.empty());
     TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
     assert(Current);
@@ -756,7 +756,7 @@ class ImutAVLTreeInOrderIterator {
 
 public:
   typedef ImutAVLTree<ImutInfo> TreeTy;
-  typedef ImutAVLTreeInOrderIterator<ImutInfo> Self;
+  typedef ImutAVLTreeInOrderIterator<ImutInfo> SelfTy;
 
   ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) {
     if (Root)
@@ -765,14 +765,16 @@ public:
 
   ImutAVLTreeInOrderIterator() : InternalItr() {}
 
-  bool operator==(const Self &x) const { return InternalItr == x.InternalItr; }
+  bool operator==(const SelfTy &x) const {
+    return InternalItr == x.InternalItr;
+  }
 
-  bool operator!=(const Self &x) const { return !(*this == x); }
+  bool operator!=(const SelfTy &x) const { return !(*this == x); }
 
   TreeTy *operator*() const { return *InternalItr; }
   TreeTy *operator->() const { return *InternalItr; }
 
-  Self &operator++() {
+  SelfTy &operator++() {
     do ++InternalItr;
     while (!InternalItr.atEnd() &&
            InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);
@@ -780,7 +782,7 @@ public:
     return *this;
   }
 
-  Self &operator--() {
+  SelfTy &operator--() {
     do --InternalItr;
     while (!InternalItr.atBeginning() &&
            InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);