[cfe-commits] r169037 - /cfe/trunk/lib/CodeGen/CGExpr.cpp

Aaron Ballman aaron at aaronballman.com
Fri Nov 30 13:15:21 PST 2012


Author: aaronballman
Date: Fri Nov 30 15:15:20 2012
New Revision: 169037

URL: http://llvm.org/viewvc/llvm-project?rev=169037&view=rev
Log:
Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.

Modified:
    cfe/trunk/lib/CodeGen/CGExpr.cpp

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=169037&r1=169036&r2=169037&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Fri Nov 30 15:15:20 2012
@@ -1950,7 +1950,7 @@
   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);





More information about the cfe-commits mailing list