From: Torok Edwin Date: Sat, 29 Nov 2008 08:52:45 +0000 (+0000) Subject: protect against negative values that would exceed allowed bit width X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=10ca770020e12cf86d43f7b15cb6959e380e935d;p=oota-llvm.git protect against negative values that would exceed allowed bit width git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60239 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; }