Implement one operator== with another.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Jun 2014 15:06:22 +0000 (15:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Jun 2014 15:06:22 +0000 (15:06 +0000)
Thanks for David Blaikie for the suggestion.

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

include/llvm/ADT/IntrusiveRefCntPtr.h

index 846ae3975dc5b8f0242918ce662e98fe7893bc4e..128ada0ec835d809280697696ed34d0006a941cc 100644 (file)
@@ -248,7 +248,7 @@ public:
 
   template <class T>
   bool operator==(const IntrusiveRefCntPtr<T> &A, std::nullptr_t B) {
-    return !A;
+    return B == A;
   }
 
   template <class T>