From: Duncan Sands Date: Thu, 23 Feb 2012 08:23:53 +0000 (+0000) Subject: GCC warns about a comparison between signed and unsigned values. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6212d312e7c6b978b767f648fd2d301131554242;p=oota-llvm.git GCC warns about a comparison between signed and unsigned values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SparseSet.h b/include/llvm/ADT/SparseSet.h index 9b276d55331..923c6a5954d 100644 --- a/include/llvm/ADT/SparseSet.h +++ b/include/llvm/ADT/SparseSet.h @@ -235,7 +235,7 @@ public: /// Note that end() changes when elements are erased, unlike std::list. /// iterator erase(iterator I) { - assert(I - begin() < size() && "Invalid iterator"); + assert(unsigned(I - begin()) < size() && "Invalid iterator"); if (I != end() - 1) { *I = Dense.back(); unsigned BackKey = KeyOf(Dense.back());