projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a44425f
)
Fix MSVC truncation of constant value warning.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 29 Jun 2020 14:59:53 +0000
(15:59 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 29 Jun 2020 15:03:00 +0000
(16:03 +0100)
llvm/include/llvm/ADT/Bitfields.h
patch
|
blob
|
history
diff --git
a/llvm/include/llvm/ADT/Bitfields.h
b/llvm/include/llvm/ADT/Bitfields.h
index
7278ec6
..
2e38cca
100644
(file)
--- a/
llvm/include/llvm/ADT/Bitfields.h
+++ b/
llvm/include/llvm/ADT/Bitfields.h
@@
-110,7
+110,7
@@
template <typename T, unsigned Bits> 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