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

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

llvm-svn: 170652
This commit is contained in:
Richard Smith 2012-12-20 03:59:24 +00:00
parent 7d75f9e3d3
commit 3287fac591
1 changed files with 1 additions and 1 deletions

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.