diff --git a/llvm/include/llvm/Support/MathExtras.h b/llvm/include/llvm/Support/MathExtras.h index ec9b5008792e17..640b3a11ce6c24 100644 --- a/llvm/include/llvm/Support/MathExtras.h +++ b/llvm/include/llvm/Support/MathExtras.h @@ -766,7 +766,7 @@ template constexpr inline int32_t SignExtend32(uint32_t X) { } /// Sign-extend the number in the bottom B bits of X to a 32-bit integer. -/// Requires 0 < B < 32. +/// Requires 0 < B <= 32. inline int32_t SignExtend32(uint32_t X, unsigned B) { assert(B > 0 && "Bit width can't be 0."); assert(B <= 32 && "Bit width out of range."); @@ -774,7 +774,7 @@ inline int32_t SignExtend32(uint32_t X, unsigned B) { } /// Sign-extend the number in the bottom B bits of X to a 64-bit integer. -/// Requires 0 < B < 64. +/// Requires 0 < B <= 64. template constexpr inline int64_t SignExtend64(uint64_t x) { static_assert(B > 0, "Bit width can't be 0."); static_assert(B <= 64, "Bit width out of range."); @@ -782,7 +782,7 @@ template constexpr inline int64_t SignExtend64(uint64_t x) { } /// Sign-extend the number in the bottom B bits of X to a 64-bit integer. -/// Requires 0 < B < 64. +/// Requires 0 < B <= 64. inline int64_t SignExtend64(uint64_t X, unsigned B) { assert(B > 0 && "Bit width can't be 0."); assert(B <= 64 && "Bit width out of range.");