[Lldb-commits] [lldb] 9894cd5 - [lldb] Fix a warning

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 21 16:00:48 PST 2024


Author: Kazu Hirata
Date: 2024-11-21T16:00:42-08:00
New Revision: 9894cd5febbb89ad5b97c006179aaee77b824f91

URL: https://github.com/llvm/llvm-project/commit/9894cd5febbb89ad5b97c006179aaee77b824f91
DIFF: https://github.com/llvm/llvm-project/commit/9894cd5febbb89ad5b97c006179aaee77b824f91.diff

LOG: [lldb] Fix a warning

This patch fixes:

  lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp:53:32: error:
  field 'm_thread_reg_ctx_sp' will be initialized after field
  'm_thread_name' [-Werror,-Wreorder-ctor]

Added: 
    

Modified: 
    lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
index c810eb9ed61d26..91552dd9769252 100644
--- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -50,7 +50,7 @@ using namespace lldb_private;
 
 // Construct a Thread object with given data
 ThreadElfCore::ThreadElfCore(Process &process, const ThreadData &td)
-    : Thread(process, td.tid), m_thread_reg_ctx_sp(), m_thread_name(td.name),
+    : Thread(process, td.tid), m_thread_name(td.name), m_thread_reg_ctx_sp(),
       m_gpregset_data(td.gpregset), m_notes(td.notes),
       m_siginfo(std::move(td.siginfo)) {}
 


        


More information about the lldb-commits mailing list