From: Chris Lattner Date: Mon, 14 Jan 2008 21:47:29 +0000 (+0000) Subject: Fix build issue on cygwin, patch by Sam Bishop X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21dd821423a4700f6b11c2e87949b49d061c3183;p=clang 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 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)