[Lldb-commits] [PATCH] D104041: [lldb] Replace default bodies of special member functions with = default;

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 14 09:19:24 PDT 2021


shafik added a comment.

I am sure I could find  a bunch of other ends and odds but perhaps you have other checks that will cover these coming up.



================
Comment at: lldb/include/lldb/Core/ThreadSafeValue.h:21
   // Constructors and Destructors
   ThreadSafeValue() : m_value(), m_mutex() {}
 
----------------
We can also default this as well, we can use member initializers for these values.


================
Comment at: lldb/include/lldb/Core/UserSettingsController.h:35
 public:
   Properties() : m_collection_sp() {}
 
----------------
I believe this should be defaultable as well.


================
Comment at: lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h:137
   PointerAsArraySettings m_pointer_as_array;
   bool m_use_synthetic : 1;
   bool m_scope_already_checked : 1;
----------------
It looks like these members somehow got missed in the last PR that changed to use in class member initializers.


================
Comment at: lldb/include/lldb/Host/HostNativeProcessBase.h:27
 public:
   HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {}
   explicit HostNativeProcessBase(lldb::process_t process)
----------------
This looks like another case that got missed in the last PR to change to use in class member init.


================
Comment at: lldb/include/lldb/Host/HostNativeThreadBase.h:30
 public:
   HostNativeThreadBase();
   explicit HostNativeThreadBase(lldb::thread_t thread);
----------------
I think we can switch this to `=default` as well.


================
Comment at: lldb/include/lldb/Host/HostNativeThreadBase.h:48
 
   lldb::thread_t m_thread;
   lldb::thread_result_t m_result = 0;
----------------
` lldb::thread_t m_thread = LLDB_INVALID_HOST_THREAD`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104041/new/

https://reviews.llvm.org/D104041



More information about the lldb-commits mailing list