[Lldb-commits] [PATCH] D113519: [lldb] [gdb-server] Fix fill_clamp to handle signed src types
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 9 23:43:07 PST 2021
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp:776
+ constexpr auto T_max = std::numeric_limits<typename T::value_type>::max();
+ dest = src >= 0 && static_cast<UU>(src) <= T_max ? src : fallback;
}
----------------
`T` will always be unsigned here, right? May not hurt to add a `static_assert` for that, mainly to avoid people wondering if this logic is correct...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113519/new/
https://reviews.llvm.org/D113519
More information about the lldb-commits
mailing list