commit | a9c9423e52c4dccb7846c9c37ec22fb642021a5a | [log] [tgz] |
---|---|---|
author | David Majnemer <david.majnemer@gmail.com> | Mon Jul 18 17:03:09 2016 +0000 |
committer | David Majnemer <david.majnemer@gmail.com> | Mon Jul 18 17:03:09 2016 +0000 |
tree | e756e918229f4f150836857df7d04c6be84144b8 | |
parent | 7778b11654f3f10fddf2d14557565459d97c4db8 [diff] |
[MathExtras] Fix UB in minIntN We negated a value with a signed type which invited problems when that value was the most negative signed number. Use an unsigned type for the value instead. It will compute the same twos complement result without the UB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275815 91177308-0d34-0410-b5e6-96231b3b80d8