aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-14 21:47:29 +0000
committerChris Lattner <sabre@nondot.org>2008-01-14 21:47:29 +0000
commit21dd821423a4700f6b11c2e87949b49d061c3183 (patch)
tree44914c3c35eeb3e732b4cb1a0659f6eb0462f51f
parent3f0c5adc2f488f40aa0f7b88c27b347f80b104bb (diff)
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
-rw-r--r--Sema/SemaDecl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index 621e2d9895..ddfde8f44d 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -1509,9 +1509,11 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
// 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)