[llvm] r260407 - [ADT] Add "return *this; " to PointerEmbeddedInt::operator=.

Jordan Rose via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 10:54:42 PST 2016


Author: jrose
Date: Wed Feb 10 12:54:41 2016
New Revision: 260407

URL: http://llvm.org/viewvc/llvm-project?rev=260407&view=rev
Log:
[ADT] Add "return *this;" to PointerEmbeddedInt::operator=.

Modified:
    llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h

Modified: llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h?rev=260407&r1=260406&r2=260407&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerEmbeddedInt.h Wed Feb 10 12:54:41 2016
@@ -56,6 +56,7 @@ public:
   PointerEmbeddedInt &operator=(IntT I) {
     assert((I & Mask) == 0 && "Integer has bits outside those preserved!");
     Value = static_cast<uintptr_t>(I) << Shift;
+    return *this;
   }
 
   // Note that this implicit conversion additionally allows all of the basic




More information about the llvm-commits mailing list