Fix a compilation warning with gcc 4.6
authorEli Bendersky <eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000 (18:53 +0000)
committerEli Bendersky <eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000 (18:53 +0000)
llvm-svn: 170440

clang/lib/CodeGen/CGRecordLayoutBuilder.cpp

index 43088b4..90c3387 100644 (file)
@@ -1088,7 +1088,7 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D,
              "Storage size does not match the element type size");
     }
     assert(Info.Size > 0 && "Empty bitfield!");
-    assert(Info.Offset + Info.Size <= Info.StorageSize &&
+    assert(static_cast<unsigned>(Info.Offset) + Info.Size <= Info.StorageSize &&
            "Bitfield outside of its allocated storage");
   }
 #endif