diff options
author | Shafik Yaghmour <syaghmour@apple.com> | 2022-03-14 13:32:03 -0700 |
---|---|---|
committer | Shafik Yaghmour <syaghmour@apple.com> | 2022-03-14 13:32:03 -0700 |
commit | 28c878aeb29a7e7a9ae8f748de6a3c41482b97be (patch) | |
tree | 6d057edb2aacc7705718950dedbf5c40cb758838 /lldb/source/Expression/Materializer.cpp | |
parent | c79ab1065e89872668b8d43c747ff3e5974b0d96 (diff) | |
download | llvm-28c878aeb29a7e7a9ae8f748de6a3c41482b97be.zip llvm-28c878aeb29a7e7a9ae8f748de6a3c41482b97be.tar.gz llvm-28c878aeb29a7e7a9ae8f748de6a3c41482b97be.tar.bz2 |
[LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB
Applied modernize-use-default-member-init clang-tidy check over LLDB.
It appears in many files we had already switched to in class member init but
never updated the constructors to reflect that. This check is already present in
the lldb/.clang-tidy config.
Differential Revision: https://reviews.llvm.org/D121481
Diffstat (limited to 'lldb/source/Expression/Materializer.cpp')
-rw-r--r-- | lldb/source/Expression/Materializer.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp index e0a91e5..feabfd4 100644 --- a/lldb/source/Expression/Materializer.cpp +++ b/lldb/source/Expression/Materializer.cpp @@ -413,9 +413,7 @@ uint32_t Materializer::AddPersistentVariable( class EntityVariable : public Materializer::Entity { public: EntityVariable(lldb::VariableSP &variable_sp) - : Entity(), m_variable_sp(variable_sp), m_is_reference(false), - m_temporary_allocation(LLDB_INVALID_ADDRESS), - m_temporary_allocation_size(0) { + : Entity(), m_variable_sp(variable_sp) { // Hard-coding to maximum size of a pointer since all variables are // materialized by reference m_size = 8; @@ -749,9 +747,9 @@ public: private: lldb::VariableSP m_variable_sp; - bool m_is_reference; - lldb::addr_t m_temporary_allocation; - size_t m_temporary_allocation_size; + bool m_is_reference = false; + lldb::addr_t m_temporary_allocation = LLDB_INVALID_ADDRESS; + size_t m_temporary_allocation_size = 0; lldb::DataBufferSP m_original_data; }; @@ -769,9 +767,7 @@ public: bool keep_in_memory, Materializer::PersistentVariableDelegate *delegate) : Entity(), m_type(type), m_is_program_reference(is_program_reference), - m_keep_in_memory(keep_in_memory), - m_temporary_allocation(LLDB_INVALID_ADDRESS), - m_temporary_allocation_size(0), m_delegate(delegate) { + m_keep_in_memory(keep_in_memory), m_delegate(delegate) { // Hard-coding to maximum size of a pointer since all results are // materialized by reference m_size = 8; @@ -1030,8 +1026,8 @@ private: bool m_is_program_reference; bool m_keep_in_memory; - lldb::addr_t m_temporary_allocation; - size_t m_temporary_allocation_size; + lldb::addr_t m_temporary_allocation = LLDB_INVALID_ADDRESS; + size_t m_temporary_allocation_size = 0; Materializer::PersistentVariableDelegate *m_delegate; }; |