Clean up static analyzer warnings.
[oota-llvm.git] / lib / Support / ScaledNumber.cpp
index 725f4649613df64f46837ef3d5f3a03428060122..3cd75091caf05e12ab36d79efe96780375c2c863 100644 (file)
@@ -169,8 +169,7 @@ static std::string toStringAPFloat(uint64_t D, int E, unsigned Precision) {
   int Shift = 63 - (NewE - E);
   assert(Shift <= LeadingZeros);
   assert(Shift == LeadingZeros || NewE == ScaledNumbers::MaxScale);
-  assert((Shift & (1u << std::numeric_limits<int>::digits)) == 0 &&
-         "undefined behavior");
+  assert(Shift >= 0 && Shift < 64 && "undefined behavior");
   D <<= Shift;
   E = NewE;