From 5447e5d973bfccb5a32d3ca9cb0105340f178b85 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 29 Jun 2020 15:59:53 +0100 Subject: [PATCH] Fix MSVC truncation of constant value warning. --- llvm/include/llvm/ADT/Bitfields.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/Bitfields.h b/llvm/include/llvm/ADT/Bitfields.h index 7278ec6..2e38cca 100644 --- a/llvm/include/llvm/ADT/Bitfields.h +++ b/llvm/include/llvm/ADT/Bitfields.h @@ -110,7 +110,7 @@ template struct BitPatterns { static constexpr Unsigned SignBitMask = Unsigned(1) << (Bits - 1); // 00100000 static constexpr Unsigned Smax = Umax >> 1U; // 00011111 static constexpr Unsigned Smin = ~Smax; // 11100000 - static constexpr Unsigned SignExtend = Smin << 1U; // 11000000 + static constexpr Unsigned SignExtend = Unsigned(Smin << 1U); // 11000000 }; /// `Compressor` is used to manipulate the bits of a (possibly signed) integer -- 2.7.4