From 45178b9d60fc06cbd0e3f4aa3d1f2285fdf035ca Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 3 Jun 2014 15:06:22 +0000 Subject: [PATCH] Implement one operator== with another. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h index 846ae3975dc..128ada0ec83 100644 --- a/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -248,7 +248,7 @@ public: template bool operator==(const IntrusiveRefCntPtr &A, std::nullptr_t B) { - return !A; + return B == A; } template -- 2.34.1