[llvm-commits] [llvm] r151243 - /llvm/trunk/include/llvm/ADT/SparseSet.h

Duncan Sands baldrick at free.fr
Thu Feb 23 00:23:53 PST 2012


Author: baldrick
Date: Thu Feb 23 02:23:53 2012
New Revision: 151243

URL: http://llvm.org/viewvc/llvm-project?rev=151243&view=rev
Log:
GCC warns about a comparison between signed and unsigned values.

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

Modified: llvm/trunk/include/llvm/ADT/SparseSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseSet.h?rev=151243&r1=151242&r2=151243&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SparseSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SparseSet.h Thu Feb 23 02:23:53 2012
@@ -235,7 +235,7 @@
   /// 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());





More information about the llvm-commits mailing list