aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2022-03-30 08:17:56 +0200
committerserge-sans-paille <sguelton@redhat.com>2022-03-30 16:47:33 +0200
commitc531171d995728f55e5775d354a21dceed03edce (patch)
tree24e80168700e9d99e986b9fc7140d280ad796a57 /lldb/packages/Python/lldbsuite/test/dotest.py
parent5b38292d5d776439b54e7cc02c7a20c58717f3d2 (diff)
downloadllvm-c531171d995728f55e5775d354a21dceed03edce.zip
llvm-c531171d995728f55e5775d354a21dceed03edce.tar.gz
llvm-c531171d995728f55e5775d354a21dceed03edce.tar.bz2
Fix invalid overflow check in flang
Statically checking for overflow with if constexpr (sizeof(std::size_t) <= sizeof(std::int64_t)) { return static_cast<std::int64_t>(length); } Doesn't work if `sizeof(std::size_t) == sizeof(std::int64_t)` because std::size_t is unsigned. if `length == std::numeric_limits<size_t>` casting it to `int64_t` is going to overflow. This code would be much simpler if returning a `uint64_t` instead of a signed value... Differential Revision: https://reviews.llvm.org/D122705
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
0 files changed, 0 insertions, 0 deletions