From: David Greene Date: Tue, 15 Jan 2013 23:13:49 +0000 (+0000) Subject: Fix signed/unsigned Compare X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed6355d56cbeb1cd1a77cc46e0a519af25523ccb;p=clang Fix signed/unsigned Compare Do some casting to avoid a signed/unsigned compare. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172571 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 1d7271d6a4..02920cd9b6 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -1075,7 +1075,8 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D, // the size + offset should match the storage size in that case as it // "starts" at the back. if (getDataLayout().isBigEndian()) - assert((Info.Offset + Info.Size) == Info.StorageSize && + assert(static_cast(Info.Offset + Info.Size) == + Info.StorageSize && "Big endian union bitfield does not end at the back"); else assert(Info.Offset == 0 &&