Skip to content

Commit da77334

Browse files
committed
[LLDB] [NFC] Fix a cppcheck warning in lldb/source/Utility/Scalar.cpp
Fixes llvm#85985
1 parent ac40463 commit da77334

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lldb/source/Utility/Scalar.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,7 @@ bool Scalar::SignExtend(uint32_t sign_bit_pos) {
753753
return false;
754754

755755
case Scalar::e_int:
756-
if (max_bit_pos == sign_bit_pos)
757-
return true;
758-
else if (sign_bit_pos < (max_bit_pos - 1)) {
756+
if (sign_bit_pos < (max_bit_pos - 1)) {
759757
llvm::APInt sign_bit = llvm::APInt::getSignMask(sign_bit_pos + 1);
760758
llvm::APInt bitwize_and = m_integer & sign_bit;
761759
if (bitwize_and.getBoolValue()) {

0 commit comments

Comments
 (0)