diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-10-05 18:09:09 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-10-05 18:10:12 +0200 |
commit | 64eaffb613d0cb7fa7542fa48281a2e617ad8ee9 (patch) | |
tree | 019272d7328acdab72b56dd1c48742a062c610d0 /llvm/lib/Support/APInt.cpp | |
parent | 32ab79ebc496d73cb0eb3ad3b54d32b00fc49ba1 (diff) | |
download | llvm-64eaffb613d0cb7fa7542fa48281a2e617ad8ee9.zip llvm-64eaffb613d0cb7fa7542fa48281a2e617ad8ee9.tar.gz llvm-64eaffb613d0cb7fa7542fa48281a2e617ad8ee9.tar.bz2 |
[APInt] Fix type limits warning (NFC)
Unsigned number is always >= 0.
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index 67ea57c..298dcf6 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp @@ -360,8 +360,7 @@ void APInt::flipBit(unsigned bitPosition) { void APInt::insertBits(const APInt &subBits, unsigned bitPosition) { unsigned subBitWidth = subBits.getBitWidth(); - assert(subBitWidth >= 0 && (subBitWidth + bitPosition) <= BitWidth && - "Illegal bit insertion"); + assert((subBitWidth + bitPosition) <= BitWidth && "Illegal bit insertion"); // inserting no bits is a noop. if (subBitWidth == 0) |