From 207835064514e968e40685bdc48b7bb0fc5c2779 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 18 Sep 2022 18:41:02 -0700 Subject: [PATCH] Use std::make_unsigned_t (NFC) --- .../Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp | 2 +- llvm/include/llvm/ADT/Bitfields.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 7ee15fd7..c2c01d1 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -772,7 +772,7 @@ template static void fill_clamp(T &dest, U src, typename T::value_type fallback) { static_assert(std::is_unsigned::value, "Destination type must be unsigned."); - using UU = typename std::make_unsigned::type; + using UU = std::make_unsigned_t; constexpr auto T_max = std::numeric_limits::max(); dest = src >= 0 && static_cast(src) <= T_max ? src : fallback; } diff --git a/llvm/include/llvm/ADT/Bitfields.h b/llvm/include/llvm/ADT/Bitfields.h index aaf876d..045704a 100644 --- a/llvm/include/llvm/ADT/Bitfields.h +++ b/llvm/include/llvm/ADT/Bitfields.h @@ -96,7 +96,7 @@ template struct BitPatterns { /// undefined operations over signed types (e.g. Bitwise shift operators). /// Moreover same size casting from unsigned to signed is well defined but not /// the other way around. - using Unsigned = typename std::make_unsigned::type; + using Unsigned = std::make_unsigned_t; static_assert(sizeof(Unsigned) == sizeof(T), "Types must have same size"); static constexpr unsigned TypeBits = sizeof(Unsigned) * CHAR_BIT; -- 2.7.4