Fix build issue on cygwin, patch by Sam Bishop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45977 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 621e2d9..ddfde8f 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1509,9 +1509,11 @@
// Keep track of the size of positive and negative values.
if (InitVal.isUnsigned() || !InitVal.isNegative())
- NumPositiveBits = std::max(NumPositiveBits, InitVal.getActiveBits());
+ NumPositiveBits = std::max(NumPositiveBits,
+ (unsigned)InitVal.getActiveBits());
else
- NumNegativeBits = std::max(NumNegativeBits, InitVal.getMinSignedBits());
+ NumNegativeBits = std::max(NumNegativeBits,
+ (unsigned)InitVal.getMinSignedBits());
// Keep track of whether every enum element has type int (very commmon).
if (AllElementsInt)