Don't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying

such a structure has undefined behavior. Caught by -fsanitize=bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2012-12-20 03:59:24 +00:00
parent 2427773f2f
commit e8ce626308

View File

@ -23,7 +23,7 @@ class APSInt : public APInt {
bool IsUnsigned;
public:
/// Default constructor that creates an uninitialized APInt.
explicit APSInt() {}
explicit APSInt() : IsUnsigned(false) {}
/// APSInt ctor - Create an APSInt with the specified width, default to
/// unsigned.