github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h --
lldb/include/lldb/Target/RegisterType.h
lldb/include/lldb/Target/RegisterTypeUnion.h
lldb/include/lldb/Target/RegisterTypeVector.h
lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
lldb/source/Target/RegisterType.cpp lldb/source/Target/RegisterTypeUnion.cpp
lldb/source/Target/RegisterTypeVector.cpp
lldb/unittests/Target/RegisterTypeTest.cpp
lldb/include/lldb/Core/DumpRegisterInfo.h lldb/include/lldb/Core/FormatEntity.h
lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
lldb/include/lldb/Target/DynamicRegisterInfo.h
lldb/include/lldb/Target/RegisterTypeBuilder.h
lldb/include/lldb/Target/Target.h lldb/include/lldb/lldb-private-types.h
lldb/source/Core/DumpRegisterInfo.cpp lldb/source/Core/DumpRegisterValue.cpp
lldb/source/Core/FormatEntity.cpp
lldb/source/DataFormatters/DumpValueObjectOptions.cpp
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.cpp
lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.h
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
lldb/source/Target/DynamicRegisterInfo.cpp lldb/source/Target/Target.cpp
lldb/unittests/Core/DumpRegisterInfoTest.cpp
lldb/include/lldb/Target/RegisterTypeFlags.h
lldb/source/Target/RegisterTypeFlags.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
b/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
index b99493570..605807f03 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
@@ -34,26 +34,26 @@
using namespace lldb_private;
-const RegisterType *Arm64RegisterTypeDetector::DetectPOREL0Type(uint64_t hwcap,
- uint64_t hwcap2,
- uint64_t hwcap3) {
+const RegisterType *
+Arm64RegisterTypeDetector::DetectPOREL0Type(uint64_t hwcap, uint64_t hwcap2,
+ uint64_t hwcap3) {
(void)hwcap;
(void)hwcap3;
if (!(hwcap2 & HWCAP2_POE))
return {};
- static const RegisterTypeEnum por_el0_perm_enum("por_el0_perm_enum",
- {
- {0b0000, "No Access"},
- {0b0001, "Read"},
- {0b0010, "Execute"},
- {0b0011, "Read, Execute"},
- {0b0100, "Write"},
- {0b0101, "Write, Read"},
- {0b0110, "Write, Execute"},
- {0b0111, "Read, Write,
Execute"},
- });
+ static const RegisterTypeEnum por_el0_perm_enum(
+ "por_el0_perm_enum", {
+ {0b0000, "No Access"},
+ {0b0001, "Read"},
+ {0b0010, "Execute"},
+ {0b0011, "Read, Execute"},
+ {0b0100, "Write"},
+ {0b0101, "Write, Read"},
+ {0b0110, "Write, Execute"},
+ {0b0111, "Read, Write, Execute"},
+ });
static const RegisterTypeFlags por_el0_flags(
"por_el0_flags", 8,
@@ -267,29 +267,30 @@ const RegisterType
*Arm64RegisterTypeDetector::DetectV0Type(uint64_t hwcap,
}
const RegisterType *Arm64RegisterTypeDetector::DetectX0Type(uint64_t hwcap,
- uint64_t hwcap2,
- uint64_t hwcap3)
{
+ uint64_t hwcap2,
+ uint64_t hwcap3) {
(void)hwcap;
(void)hwcap2;
(void)hwcap3;
- static RegisterTypeFlags x0_flags_big_little("x0_flags_big_little", 8, {
- {"w", 16, 63}, {"x", 0, 15}});
- static RegisterTypeFlags x0_flags_little_big("x0_flags_little_big", 8, {
- {"y", 48, 63}, {"z", 0, 47}});
+ static RegisterTypeFlags x0_flags_big_little("x0_flags_big_little", 8,
+ {{"w", 16, 63}, {"x", 0, 15}});
+ static RegisterTypeFlags x0_flags_little_big("x0_flags_little_big", 8,
+ {{"y", 48, 63}, {"z", 0, 47}});
- static RegisterTypeVector x0_vec8( "x0_vec8", "uint8", 8);
+ static RegisterTypeVector x0_vec8("x0_vec8", "uint8", 8);
static RegisterTypeVector x0_vec16("x0_vec16", "uint16", 4);
static RegisterTypeVector x0_vec32("x0_vec32", "uint32", 2);
static RegisterTypeVector x0_vec64("x0_vec64", "uint64", 1);
- static RegisterTypeUnion x0_vec_union(
- "x0_vec_union",
- {{"8", &x0_vec8}, {"16", &x0_vec16}, {"32", &x0_vec32}, {"64",
&x0_vec64}});
-
- static RegisterTypeUnion x0_union(
- "x0_union",
- {{"big_little", &x0_flags_big_little}, {"little_big",
&x0_flags_little_big},
- {"vector", &x0_vec_union}});
+ static RegisterTypeUnion x0_vec_union("x0_vec_union", {{"8", &x0_vec8},
+ {"16", &x0_vec16},
+ {"32", &x0_vec32},
+ {"64", &x0_vec64}});
+
+ static RegisterTypeUnion x0_union("x0_union",
+ {{"big_little", &x0_flags_big_little},
+ {"little_big", &x0_flags_little_big},
+ {"vector", &x0_vec_union}});
return &x0_union;
}
diff --git a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
b/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
index e1f70c8cc..28b9c83e7 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
@@ -68,13 +68,13 @@ private:
static const RegisterType *DetectFPMRType(uint64_t hwcap, uint64_t hwcap2,
uint64_t hwcap3);
static const RegisterType *DetectX0Type(uint64_t hwcap, uint64_t hwcap2,
- uint64_t hwcap3);
+ uint64_t hwcap3);
static const RegisterType *DetectV0Type(uint64_t hwcap, uint64_t hwcap2,
uint64_t hwcap3);
static const RegisterType *
DetectGCSFeaturesType(uint64_t hwcap, uint64_t hwcap2, uint64_t hwcap3);
static const RegisterType *DetectPOREL0Type(uint64_t hwcap, uint64_t hwcap2,
- uint64_t hwcap3);
+ uint64_t hwcap3);
struct RegisterEntry {
RegisterEntry(llvm::StringRef name, unsigned size, DetectorFn detector)
diff --git
a/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.cpp
b/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.cpp
index 01b3e1b75..16e073657 100644
--- a/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.cpp
+++ b/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.cpp
@@ -59,10 +59,9 @@ static std::string MakeTypeName(const RegisterType
&type_info,
return type_name + type_info.GetID();
}
-CompilerType
-RegisterTypeBuilderClang::BuildVectorType(const
lldb_private::RegisterTypeVector &vector_info,
- uint32_t register_byte_size,
- lldb::TypeSystemClangSP type_system) {
+CompilerType RegisterTypeBuilderClang::BuildVectorType(
+ const lldb_private::RegisterTypeVector &vector_info,
+ uint32_t register_byte_size, lldb::TypeSystemClangSP type_system) {
// Don't need to check for existing types because all array types are
// pre-existing. This also means they do not have unique names.
auto element_info = vector_info.GetElementTypeInfo();
@@ -74,9 +73,10 @@ RegisterTypeBuilderClang::BuildVectorType(const
lldb_private::RegisterTypeVector
/*is_vector=*/true);
}
-CompilerType RegisterTypeBuilderClang::BuildEnumType(const RegisterTypeEnum
&enum_type_info,
- uint32_t register_byte_size,
- lldb::TypeSystemClangSP type_system) {
+CompilerType
+RegisterTypeBuilderClang::BuildEnumType(const RegisterTypeEnum &enum_type_info,
+ uint32_t register_byte_size,
+ lldb::TypeSystemClangSP type_system) {
std::string enum_type_name = MakeTypeName(enum_type_info,
register_byte_size);
// Reuse existing type if we can.
@@ -160,10 +160,9 @@ CompilerType RegisterTypeBuilderClang::BuildFlagsType(
return flags_type;
}
-CompilerType
-RegisterTypeBuilderClang::BuildUnionType(const lldb_private::RegisterTypeUnion
&union_info,
- uint32_t register_byte_size,
- lldb::TypeSystemClangSP type_system) {
+CompilerType RegisterTypeBuilderClang::BuildUnionType(
+ const lldb_private::RegisterTypeUnion &union_info,
+ uint32_t register_byte_size, lldb::TypeSystemClangSP type_system) {
std::string union_type_name = MakeTypeName(union_info, register_byte_size);
// Reuse existing type if we can.
diff --git a/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.h
b/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.h
index 498e4b43f..7c355e492 100644
--- a/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.h
+++ b/lldb/source/Plugins/RegisterTypeBuilder/RegisterTypeBuilderClang.h
@@ -14,8 +14,8 @@
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Target/RegisterTypeBuilder.h"
#include "lldb/Target/RegisterTypeFlags.h"
-#include "lldb/Target/RegisterTypeVector.h"
#include "lldb/Target/RegisterTypeUnion.h"
+#include "lldb/Target/RegisterTypeVector.h"
#include "lldb/Target/Target.h"
namespace lldb_private {
@@ -89,14 +89,15 @@ private:
CompilerType BuildFlagsType(const RegisterTypeFlags &flags_info,
uint32_t register_byte_size,
lldb::TypeSystemClangSP type_system);
-
- CompilerType BuildVectorType(const lldb_private::RegisterTypeVector
&vector_info,
- uint32_t register_byte_size,
- lldb::TypeSystemClangSP type_system);
+
+ CompilerType
+ BuildVectorType(const lldb_private::RegisterTypeVector &vector_info,
+ uint32_t register_byte_size,
+ lldb::TypeSystemClangSP type_system);
CompilerType BuildUnionType(const lldb_private::RegisterTypeUnion
&union_info,
- uint32_t register_byte_size,
- lldb::TypeSystemClangSP type_system);
+ uint32_t register_byte_size,
+ lldb::TypeSystemClangSP type_system);
// This is created the first time a register type is requested, then handed
// to the type system. We keep a reference to it so we can add more layouts
``````````
</details>
https://github.com/llvm/llvm-project/pull/196032
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits