diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index 4c4bb7dd081..5a9425457dd 100644 --- a/include/llvm/ADT/PointerIntPair.h +++ b/include/llvm/ADT/PointerIntPair.h @@ -53,7 +53,7 @@ public: } void setInt(IntType Int) { - assert(Int < (1 << IntBits) && "Integer too large for field"); + assert(unsigned(Int) < (1 << IntBits) && "Integer too large for field"); Value = reinterpret_cast(getPointer()) | (intptr_t)Int; }