forked from OSchip/llvm-project
[Breakpoint] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
This commit is contained in:
parent
3a8c51480f
commit
ee4b6cf538
|
@ -1012,8 +1012,7 @@ void Breakpoint::SendBreakpointChangedEvent(BreakpointEventData *data) {
|
|||
|
||||
Breakpoint::BreakpointEventData::BreakpointEventData(
|
||||
BreakpointEventType sub_type, const BreakpointSP &new_breakpoint_sp)
|
||||
: EventData(), m_breakpoint_event(sub_type),
|
||||
m_new_breakpoint_sp(new_breakpoint_sp) {}
|
||||
: m_breakpoint_event(sub_type), m_new_breakpoint_sp(new_breakpoint_sp) {}
|
||||
|
||||
Breakpoint::BreakpointEventData::~BreakpointEventData() = default;
|
||||
|
||||
|
|
|
@ -23,8 +23,7 @@ static void NotifyChange(const BreakpointSP &bp, BreakpointEventType event) {
|
|||
}
|
||||
|
||||
BreakpointList::BreakpointList(bool is_internal)
|
||||
: m_mutex(), m_breakpoints(), m_next_break_id(0),
|
||||
m_is_internal(is_internal) {}
|
||||
: m_next_break_id(0), m_is_internal(is_internal) {}
|
||||
|
||||
BreakpointList::~BreakpointList() = default;
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ BreakpointLocation::BreakpointLocation(break_id_t loc_id, Breakpoint &owner,
|
|||
bool hardware, bool check_for_resolver)
|
||||
: m_being_created(true), m_should_resolve_indirect_functions(false),
|
||||
m_is_reexported(false), m_is_indirect(false), m_address(addr),
|
||||
m_owner(owner), m_options_up(), m_bp_site_sp(), m_condition_mutex(),
|
||||
m_condition_hash(0), m_loc_id(loc_id), m_hit_counter() {
|
||||
m_owner(owner), m_condition_hash(0), m_loc_id(loc_id), m_hit_counter() {
|
||||
if (check_for_resolver) {
|
||||
Symbol *symbol = m_address.CalculateSymbolContextSymbol();
|
||||
if (symbol && symbol->IsIndirect()) {
|
||||
|
|
|
@ -17,8 +17,7 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
|
||||
// BreakpointLocationCollection constructor
|
||||
BreakpointLocationCollection::BreakpointLocationCollection()
|
||||
: m_break_loc_collection(), m_collection_mutex() {}
|
||||
BreakpointLocationCollection::BreakpointLocationCollection() = default;
|
||||
|
||||
// Destructor
|
||||
BreakpointLocationCollection::~BreakpointLocationCollection() = default;
|
||||
|
|
|
@ -20,8 +20,7 @@ using namespace lldb;
|
|||
using namespace lldb_private;
|
||||
|
||||
BreakpointLocationList::BreakpointLocationList(Breakpoint &owner)
|
||||
: m_owner(owner), m_locations(), m_address_to_location(), m_mutex(),
|
||||
m_next_id(0), m_new_location_recorder(nullptr) {}
|
||||
: m_owner(owner), m_next_id(0), m_new_location_recorder(nullptr) {}
|
||||
|
||||
BreakpointLocationList::~BreakpointLocationList() = default;
|
||||
|
||||
|
|
|
@ -121,11 +121,10 @@ bool BreakpointOptions::NullCallback(void *baton,
|
|||
|
||||
// BreakpointOptions constructor
|
||||
BreakpointOptions::BreakpointOptions(bool all_flags_set)
|
||||
: m_callback(BreakpointOptions::NullCallback), m_callback_baton_sp(),
|
||||
: m_callback(BreakpointOptions::NullCallback),
|
||||
m_baton_is_command_baton(false), m_callback_is_synchronous(false),
|
||||
m_enabled(true), m_one_shot(false), m_ignore_count(0), m_thread_spec_up(),
|
||||
m_condition_text(), m_condition_text_hash(0), m_auto_continue(false),
|
||||
m_set_flags(0) {
|
||||
m_enabled(true), m_one_shot(false), m_ignore_count(0),
|
||||
m_condition_text_hash(0), m_auto_continue(false), m_set_flags(0) {
|
||||
if (all_flags_set)
|
||||
m_set_flags.Set(~((Flags::ValueType)0));
|
||||
}
|
||||
|
@ -151,8 +150,8 @@ BreakpointOptions::BreakpointOptions(const BreakpointOptions &rhs)
|
|||
m_baton_is_command_baton(rhs.m_baton_is_command_baton),
|
||||
m_callback_is_synchronous(rhs.m_callback_is_synchronous),
|
||||
m_enabled(rhs.m_enabled), m_one_shot(rhs.m_one_shot),
|
||||
m_ignore_count(rhs.m_ignore_count), m_thread_spec_up(),
|
||||
m_auto_continue(rhs.m_auto_continue), m_set_flags(rhs.m_set_flags) {
|
||||
m_ignore_count(rhs.m_ignore_count), m_auto_continue(rhs.m_auto_continue),
|
||||
m_set_flags(rhs.m_set_flags) {
|
||||
if (rhs.m_thread_spec_up != nullptr)
|
||||
m_thread_spec_up = std::make_unique<ThreadSpec>(*rhs.m_thread_spec_up);
|
||||
m_condition_text = rhs.m_condition_text;
|
||||
|
|
|
@ -28,8 +28,7 @@ BreakpointResolverAddress::BreakpointResolverAddress(
|
|||
BreakpointResolverAddress::BreakpointResolverAddress(const BreakpointSP &bkpt,
|
||||
const Address &addr)
|
||||
: BreakpointResolver(bkpt, BreakpointResolver::AddressResolver),
|
||||
m_addr(addr), m_resolved_addr(LLDB_INVALID_ADDRESS), m_module_filespec() {
|
||||
}
|
||||
m_addr(addr), m_resolved_addr(LLDB_INVALID_ADDRESS) {}
|
||||
|
||||
BreakpointResolver *BreakpointResolverAddress::CreateFromStructuredData(
|
||||
const BreakpointSP &bkpt, const StructuredData::Dictionary &options_dict,
|
||||
|
|
|
@ -29,8 +29,7 @@ BreakpointResolverName::BreakpointResolverName(const BreakpointSP &bkpt,
|
|||
LanguageType language, Breakpoint::MatchType type, lldb::addr_t offset,
|
||||
bool skip_prologue)
|
||||
: BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
|
||||
m_class_name(), m_regex(), m_match_type(type), m_language(language),
|
||||
m_skip_prologue(skip_prologue) {
|
||||
m_match_type(type), m_language(language), m_skip_prologue(skip_prologue) {
|
||||
if (m_match_type == Breakpoint::Regexp) {
|
||||
m_regex = RegularExpression(name_cstr);
|
||||
if (!m_regex.IsValid()) {
|
||||
|
|
|
@ -25,9 +25,9 @@ BreakpointSite::BreakpointSite(BreakpointSiteList *list,
|
|||
m_type(eSoftware), // Process subclasses need to set this correctly using
|
||||
// SetType()
|
||||
m_saved_opcode(), m_trap_opcode(),
|
||||
m_enabled(false), // Need to create it disabled, so the first enable turns
|
||||
m_enabled(false) // Need to create it disabled, so the first enable turns
|
||||
// it on.
|
||||
m_owners(), m_owners_mutex() {
|
||||
{
|
||||
m_owners.Add(owner);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
BreakpointSiteList::BreakpointSiteList() : m_mutex(), m_bp_site_list() {}
|
||||
BreakpointSiteList::BreakpointSiteList() = default;
|
||||
|
||||
BreakpointSiteList::~BreakpointSiteList() = default;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
using namespace lldb_private;
|
||||
|
||||
StoppointCallbackContext::StoppointCallbackContext() : exe_ctx_ref() {}
|
||||
StoppointCallbackContext::StoppointCallbackContext() = default;
|
||||
|
||||
StoppointCallbackContext::StoppointCallbackContext(
|
||||
Event *e, const ExecutionContext &exe_ctx, bool synchronously)
|
||||
|
|
|
@ -30,8 +30,7 @@ Watchpoint::Watchpoint(Target &target, lldb::addr_t addr, uint32_t size,
|
|||
m_enabled(false), m_is_hardware(hardware), m_is_watch_variable(false),
|
||||
m_is_ephemeral(false), m_disabled_count(0), m_watch_read(0),
|
||||
m_watch_write(0), m_watch_was_read(0), m_watch_was_written(0),
|
||||
m_ignore_count(0), m_false_alarms(0), m_decl_str(), m_watch_spec_str(),
|
||||
m_type(), m_error(), m_options(), m_being_created(true) {
|
||||
m_ignore_count(0), m_false_alarms(0), m_being_created(true) {
|
||||
|
||||
if (type && type->IsValid())
|
||||
m_type = *type;
|
||||
|
@ -330,8 +329,7 @@ void Watchpoint::SendWatchpointChangedEvent(WatchpointEventData *data) {
|
|||
|
||||
Watchpoint::WatchpointEventData::WatchpointEventData(
|
||||
WatchpointEventType sub_type, const WatchpointSP &new_watchpoint_sp)
|
||||
: EventData(), m_watchpoint_event(sub_type),
|
||||
m_new_watchpoint_sp(new_watchpoint_sp) {}
|
||||
: m_watchpoint_event(sub_type), m_new_watchpoint_sp(new_watchpoint_sp) {}
|
||||
|
||||
Watchpoint::WatchpointEventData::~WatchpointEventData() = default;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
WatchpointList::WatchpointList() : m_watchpoints(), m_mutex() {}
|
||||
WatchpointList::WatchpointList() = default;
|
||||
|
||||
WatchpointList::~WatchpointList() = default;
|
||||
|
||||
|
|
|
@ -27,14 +27,12 @@ bool WatchpointOptions::NullCallback(void *baton,
|
|||
|
||||
// WatchpointOptions constructor
|
||||
WatchpointOptions::WatchpointOptions()
|
||||
: m_callback(WatchpointOptions::NullCallback), m_callback_baton_sp(),
|
||||
m_thread_spec_up() {}
|
||||
: m_callback(WatchpointOptions::NullCallback) {}
|
||||
|
||||
// WatchpointOptions copy constructor
|
||||
WatchpointOptions::WatchpointOptions(const WatchpointOptions &rhs)
|
||||
: m_callback(rhs.m_callback), m_callback_baton_sp(rhs.m_callback_baton_sp),
|
||||
m_callback_is_synchronous(rhs.m_callback_is_synchronous),
|
||||
m_thread_spec_up() {
|
||||
m_callback_is_synchronous(rhs.m_callback_is_synchronous) {
|
||||
if (rhs.m_thread_spec_up != nullptr)
|
||||
m_thread_spec_up = std::make_unique<ThreadSpec>(*rhs.m_thread_spec_up);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue