aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/ScaledNumber.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/ScaledNumber.cpp')
-rw-r--r--lib/Support/ScaledNumber.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ScaledNumber.cpp b/lib/Support/ScaledNumber.cpp
index fc6d4e7..6f6699c 100644
--- a/lib/Support/ScaledNumber.cpp
+++ b/lib/Support/ScaledNumber.cpp
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/ScaledNumber.h"
-
#include "llvm/ADT/APFloat.h"
#include "llvm/Support/Debug.h"
@@ -169,6 +168,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 >= 0 && Shift < 64 && "undefined behavior");
D <<= Shift;
E = NewE;