llvm.org GIT mirror llvm / e8ce626
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 Richard Smith 7 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2222 bool IsUnsigned;
2323 public:
2424 /// Default constructor that creates an uninitialized APInt.
25 explicit APSInt() {}
25 explicit APSInt() : IsUnsigned(false) {}
2626
2727 /// APSInt ctor - Create an APSInt with the specified width, default to
2828 /// unsigned.