[Lldb-commits] [lldb] 921a4d5 - [lldb] Use std::underlying_type_t (NFC)
Kazu Hirata via lldb-commits
lldb-commits at lists.llvm.org
Sat Oct 15 12:12:11 PDT 2022
Author: Kazu Hirata
Date: 2022-10-15T12:11:56-07:00
New Revision: 921a4d5be4bbe3c337419dfcc313b3eb892c2870
URL: https://github.com/llvm/llvm-project/commit/921a4d5be4bbe3c337419dfcc313b3eb892c2870
DIFF: https://github.com/llvm/llvm-project/commit/921a4d5be4bbe3c337419dfcc313b3eb892c2870.diff
LOG: [lldb] Use std::underlying_type_t (NFC)
Added:
Modified:
lldb/include/lldb/lldb-enumerations.h
lldb/source/Breakpoint/BreakpointResolverName.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index 2ac1a74214b4..9f1183a06b53 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -20,18 +20,15 @@
// this entire block, as it is not necessary for swig processing.
#define LLDB_MARK_AS_BITMASK_ENUM(Enum) \
constexpr Enum operator|(Enum a, Enum b) { \
- return static_cast<Enum>( \
- static_cast<std::underlying_type<Enum>::type>(a) | \
- static_cast<std::underlying_type<Enum>::type>(b)); \
+ return static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(a) | \
+ static_cast<std::underlying_type_t<Enum>>(b)); \
} \
constexpr Enum operator&(Enum a, Enum b) { \
- return static_cast<Enum>( \
- static_cast<std::underlying_type<Enum>::type>(a) & \
- static_cast<std::underlying_type<Enum>::type>(b)); \
+ return static_cast<Enum>(static_cast<std::underlying_type_t<Enum>>(a) & \
+ static_cast<std::underlying_type_t<Enum>>(b)); \
} \
constexpr Enum operator~(Enum a) { \
- return static_cast<Enum>( \
- ~static_cast<std::underlying_type<Enum>::type>(a)); \
+ return static_cast<Enum>(~static_cast<std::underlying_type_t<Enum>>(a)); \
} \
inline Enum &operator|=(Enum &a, Enum b) { \
a = a | b; \
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index dbaeec9c9afb..5f42a96cd8c2 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -164,7 +164,7 @@ BreakpointResolver *BreakpointResolverName::CreateFromStructuredData(
error.SetErrorString("BRN::CFSD: name entry is not a string.");
return nullptr;
}
- std::underlying_type<FunctionNameType>::type fnt;
+ std::underlying_type_t<FunctionNameType> fnt;
success = names_mask_array->GetItemAtIndexAsInteger(i, fnt);
if (!success) {
error.SetErrorString("BRN::CFSD: name mask entry is not an integer.");
More information about the lldb-commits
mailing list