From: Aaron Ballman Date: Fri, 30 Nov 2012 21:15:20 +0000 (+0000) Subject: Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99ecd9f50dc28cd8db90ddaab39e2c8843dc3500;p=clang Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169037 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index e709e729b3..ac6925f784 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1950,7 +1950,7 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { if (T->isIntegerType()) { TypeKind = 0; TypeInfo = (llvm::Log2_32(getContext().getTypeSize(T)) << 1) | - T->isSignedIntegerType(); + T->isSignedIntegerType() ? 1 : 0; } else if (T->isFloatingType()) { TypeKind = 1; TypeInfo = getContext().getTypeSize(T);