diff options
author | Justin Lebar <jlebar@google.com> | 2016-07-17 18:19:26 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-07-17 18:19:26 +0000 |
commit | b59c1dd5cf31b90ac94164259791d74acd1d9ff3 (patch) | |
tree | 21291014047e7ced2c796219e8616eb4d423d191 /llvm/unittests/Support/MathExtrasTest.cpp | |
parent | 6df6bde6943dbd4ff1183b186d11e49e322ebccc (diff) | |
download | llvm-b59c1dd5cf31b90ac94164259791d74acd1d9ff3.zip llvm-b59c1dd5cf31b90ac94164259791d74acd1d9ff3.tar.gz llvm-b59c1dd5cf31b90ac94164259791d74acd1d9ff3.tar.bz2 |
Avoid UB in maxIntN(64).
Summary:
Previously we were relying on 2's complement underflow in an int64_t.
Now we cast to a uint64_t so we explicitly get the behavior we want.
Reviewers: rnk
Subscribers: dylanmckay, llvm-commits
Differential Revision: https://reviews.llvm.org/D22445
llvm-svn: 275722
Diffstat (limited to 'llvm/unittests/Support/MathExtrasTest.cpp')
0 files changed, 0 insertions, 0 deletions