forked from OSchip/llvm-project
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:
parent
7d75f9e3d3
commit
3287fac591
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue