diff --git a/include/llvm/ADT/APSInt.h b/include/llvm/ADT/APSInt.h index be419272fec..0b98f74bd0b 100644 --- a/include/llvm/ADT/APSInt.h +++ b/include/llvm/ADT/APSInt.h @@ -223,7 +223,7 @@ public: assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); return APSInt(static_cast(*this) - RHS, IsUnsigned); } - APSInt operator~() { + APSInt operator~() const { return APSInt(~static_cast(*this), IsUnsigned); }