From c5ff624222baa7b50cc374349bf1cd0d3e22a8cb Mon Sep 17 00:00:00 2001 From: David Greene Date: Tue, 15 Jan 2013 23:13:47 +0000 Subject: [PATCH] Avoid unsigned Compare to int Cast arithmetic results to avoid comparison of an unsigned to an int. llvm-svn: 172570 --- clang/lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index dd248e1..85adf35 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1191,7 +1191,7 @@ RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV) { cast(Val)->setAlignment(Info.StorageAlignment); if (Info.IsSigned) { - assert((Info.Offset + Info.Size) <= Info.StorageSize); + assert(static_cast(Info.Offset + Info.Size) <= Info.StorageSize); unsigned HighBits = Info.StorageSize - Info.Offset - Info.Size; if (HighBits) Val = Builder.CreateShl(Val, HighBits, "bf.shl"); -- 2.7.4