Skip to content

[lldb/win] Fix -Wmissing-field-initializers warnings after 54981bb75d374 #76255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

nico
Copy link
Contributor

@nico nico commented Dec 22, 2023

No description provided.

@nico nico requested a review from DavidSpickett December 22, 2023 17:24
@nico nico requested a review from JDevlieghere as a code owner December 22, 2023 17:24
@llvmbot llvmbot added the lldb label Dec 22, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 22, 2023

@llvm/pr-subscribers-lldb

Author: Nico Weber (nico)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/76255.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (+5-5)
diff --git a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
index 5c4f80b97009a3..fee485b7599ca0 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -29,7 +29,7 @@ using namespace lldb_private;
   #reg, alt, 8, 0, eEncodingUint, eFormatHexUppercase,                         \
       {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, generic,                    \
         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
-        nullptr, nullptr,                                                      \
+        nullptr, nullptr, nullptr,                                             \
 }
 
 #define DEFINE_GPR_BIN(reg, alt) #reg, alt, 8, 0, eEncodingUint, eFormatBinary
@@ -37,14 +37,14 @@ using namespace lldb_private;
   #reg, NULL, 16, 0, eEncodingUint, eFormatVectorOfUInt64,                     \
   {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, LLDB_INVALID_REGNUM,            \
    LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                                  \
-  nullptr, nullptr
+  nullptr, nullptr, nullptr,
 
 #define DEFINE_GPR_PSEUDO_32(reg)                                              \
 {                                                                              \
   #reg, nullptr, 4, 0, eEncodingUint, eFormatHexUppercase,                     \
       {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
-        nullptr, nullptr                                                       \
+        nullptr, nullptr, nullptr,                                             \
 }
 
 #define DEFINE_GPR_PSEUDO_16(reg)                                              \
@@ -52,7 +52,7 @@ using namespace lldb_private;
   #reg, nullptr, 2, 0, eEncodingUint, eFormatHexUppercase,                     \
       {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
-        nullptr, nullptr                                                       \
+        nullptr, nullptr, nullptr,                                             \
 }
 
 #define DEFINE_GPR_PSEUDO_8(reg)                                               \
@@ -60,7 +60,7 @@ using namespace lldb_private;
   #reg, nullptr, 1, 0, eEncodingUint, eFormatHexUppercase,                     \
       {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
-        nullptr, nullptr                                                       \
+        nullptr, nullptr, nullptr,                                             \
 }
 
 namespace {

Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 04c473bea3e0f135432698fcaafab52e1fe1b5ec 7bd8eade99bbf2408a35462f1f4f643d9649efb3 -- lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
View the diff from clang-format here.
diff --git a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
index fee485b759..3d32a3d58c 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -25,43 +25,43 @@ using namespace lldb;
 using namespace lldb_private;
 
 #define DEFINE_GPR(reg, alt, generic)                                          \
-{                                                                              \
-  #reg, alt, 8, 0, eEncodingUint, eFormatHexUppercase,                         \
-      {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, generic,                    \
-        LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
+  {                                                                            \
+    #reg, alt, 8, 0, eEncodingUint, eFormatHexUppercase,                       \
+        {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, generic,                  \
+         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                            \
         nullptr, nullptr, nullptr,                                             \
-}
+  }
 
 #define DEFINE_GPR_BIN(reg, alt) #reg, alt, 8, 0, eEncodingUint, eFormatBinary
 #define DEFINE_FPU_XMM(reg)                                                    \
   #reg, NULL, 16, 0, eEncodingUint, eFormatVectorOfUInt64,                     \
-  {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, LLDB_INVALID_REGNUM,            \
-   LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                                  \
-  nullptr, nullptr, nullptr,
+      {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, LLDB_INVALID_REGNUM,        \
+       LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                              \
+      nullptr, nullptr, nullptr,
 
 #define DEFINE_GPR_PSEUDO_32(reg)                                              \
-{                                                                              \
-  #reg, nullptr, 4, 0, eEncodingUint, eFormatHexUppercase,                     \
-      {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
-        LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
+  {                                                                            \
+    #reg, nullptr, 4, 0, eEncodingUint, eFormatHexUppercase,                   \
+        {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,        \
+         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                            \
         nullptr, nullptr, nullptr,                                             \
-}
+  }
 
 #define DEFINE_GPR_PSEUDO_16(reg)                                              \
-{                                                                              \
-  #reg, nullptr, 2, 0, eEncodingUint, eFormatHexUppercase,                     \
-      {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
-        LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
+  {                                                                            \
+    #reg, nullptr, 2, 0, eEncodingUint, eFormatHexUppercase,                   \
+        {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,        \
+         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                            \
         nullptr, nullptr, nullptr,                                             \
-}
+  }
 
 #define DEFINE_GPR_PSEUDO_8(reg)                                               \
-{                                                                              \
-  #reg, nullptr, 1, 0, eEncodingUint, eFormatHexUppercase,                     \
-      {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,          \
-        LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                            \
+  {                                                                            \
+    #reg, nullptr, 1, 0, eEncodingUint, eFormatHexUppercase,                   \
+        {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,        \
+         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64},                            \
         nullptr, nullptr, nullptr,                                             \
-}
+  }
 
 namespace {
 

@DavidSpickett DavidSpickett merged commit 54378a7 into llvm:main Jan 3, 2024
@DavidSpickett
Copy link
Collaborator

Thanks for the fix! Ignoring clang-format as it would obscure the intent of the change.

@nico nico deleted the lldb-win branch February 15, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants