projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2427773
)
Don't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying
author
Richard Smith
<richard-llvm@metafoo.co.uk>
Thu, 20 Dec 2012 03:59:24 +0000
(
03:59
+0000)
committer
Richard Smith
<richard-llvm@metafoo.co.uk>
Thu, 20 Dec 2012 03:59:24 +0000
(
03:59
+0000)
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
include/llvm/ADT/APSInt.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/APSInt.h
b/include/llvm/ADT/APSInt.h
index 048c65ce2c773f00654f0f2a47db54b52ec40689..4a5e7a3918ea0c30441e1508a9df52535b3934c8 100644
(file)
--- a/
include/llvm/ADT/APSInt.h
+++ b/
include/llvm/ADT/APSInt.h
@@
-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.