diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index da8e77a7a0e..9b000da0ee3 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -943,8 +943,7 @@ APInt &APInt::sext(uint32_t width) { VAL |= mask; else pVal[wordsBefore-1] |= mask; - clearUnusedBits(); - return *this; + return clearUnusedBits(); } uint64_t mask = wordBits == 0 ? 0 : ~0ULL << wordBits;