forked from OSchip/llvm-project
[lldb] Fix modernize-use-equals-default warnings (NFC)
Fix modernize-use-equals-default warnings. Because this check is listed in LLDB's top level .clang-tidy configuration, the check is enabled by default and the resulting warnings show up in my editor. I've audited the modified lines. This is not a blind change.
This commit is contained in:
parent
9916633997
commit
91688716ba
|
@ -43,7 +43,7 @@ public:
|
|||
| eCondition | eAutoContinue)
|
||||
};
|
||||
struct CommandData {
|
||||
CommandData() {}
|
||||
CommandData() = default;
|
||||
|
||||
CommandData(const StringList &user_source, lldb::ScriptLanguage interp)
|
||||
: user_source(user_source), interpreter(interp), stop_on_error(true) {}
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
lldb::user_id_t watch_id);
|
||||
|
||||
struct CommandData {
|
||||
CommandData() {}
|
||||
CommandData() = default;
|
||||
|
||||
~CommandData() = default;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
///
|
||||
/// Initialize with a invalid section (NULL) and an invalid offset
|
||||
/// (LLDB_INVALID_ADDRESS).
|
||||
Address() {}
|
||||
Address() = default;
|
||||
|
||||
/// Copy constructor
|
||||
///
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
DiagnosticEventData(Type type, std::string message, bool debugger_specific)
|
||||
: m_message(std::move(message)), m_type(type),
|
||||
m_debugger_specific(debugger_specific) {}
|
||||
~DiagnosticEventData() override {}
|
||||
~DiagnosticEventData() override = default;
|
||||
|
||||
const std::string &GetMessage() const { return m_message; }
|
||||
bool IsDebuggerSpecific() const { return m_debugger_specific; }
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace lldb_private {
|
|||
class Declaration {
|
||||
public:
|
||||
/// Default constructor.
|
||||
Declaration() {}
|
||||
Declaration() = default;
|
||||
|
||||
/// Construct with file specification, and optional line and column.
|
||||
///
|
||||
|
|
|
@ -465,7 +465,7 @@ protected:
|
|||
uint32_t line = LLDB_INVALID_LINE_NUMBER;
|
||||
uint32_t column = 0;
|
||||
|
||||
SourceLine() {}
|
||||
SourceLine() = default;
|
||||
|
||||
bool operator==(const SourceLine &rhs) const {
|
||||
return file == rhs.file && line == rhs.line && rhs.column == column;
|
||||
|
@ -489,7 +489,7 @@ protected:
|
|||
// Whether to print a blank line at the end of the source lines.
|
||||
bool print_source_context_end_eol = true;
|
||||
|
||||
SourceLinesToDisplay() {}
|
||||
SourceLinesToDisplay() = default;
|
||||
};
|
||||
|
||||
// Get the function's declaration line number, hopefully a line number
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
lldb::addr_t m_dynamic;
|
||||
};
|
||||
|
||||
LoadedModuleInfoList() {}
|
||||
LoadedModuleInfoList() = default;
|
||||
|
||||
void add(const LoadedModuleInfo &mod) { m_list.push_back(mod); }
|
||||
|
||||
|
|
|
@ -911,7 +911,7 @@ public:
|
|||
/// correctly.
|
||||
class LookupInfo {
|
||||
public:
|
||||
LookupInfo() {}
|
||||
LookupInfo() = default;
|
||||
|
||||
LookupInfo(ConstString name, lldb::FunctionNameType name_type_mask,
|
||||
lldb::LanguageType language);
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace lldb_private {
|
|||
|
||||
class ModuleSpec {
|
||||
public:
|
||||
ModuleSpec() {}
|
||||
ModuleSpec() = default;
|
||||
|
||||
/// If the \c data argument is passed, its contents will be used
|
||||
/// as the module contents instead of trying to read them from
|
||||
|
@ -274,7 +274,7 @@ protected:
|
|||
|
||||
class ModuleSpecList {
|
||||
public:
|
||||
ModuleSpecList() {}
|
||||
ModuleSpecList() = default;
|
||||
|
||||
ModuleSpecList(const ModuleSpecList &rhs) {
|
||||
std::lock_guard<std::recursive_mutex> lhs_guard(m_mutex);
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace lldb_private {
|
|||
|
||||
class StructuredDataImpl {
|
||||
public:
|
||||
StructuredDataImpl() {}
|
||||
StructuredDataImpl() = default;
|
||||
|
||||
StructuredDataImpl(const StructuredDataImpl &rhs) = default;
|
||||
|
||||
|
|
|
@ -795,7 +795,7 @@ protected:
|
|||
|
||||
class ChildrenManager {
|
||||
public:
|
||||
ChildrenManager() {}
|
||||
ChildrenManager() = default;
|
||||
|
||||
bool HasChildAtIndex(size_t idx) {
|
||||
std::lock_guard<std::recursive_mutex> guard(m_mutex);
|
||||
|
|
|
@ -105,7 +105,7 @@ private:
|
|||
|
||||
class TypeNameSpecifierImpl {
|
||||
public:
|
||||
TypeNameSpecifierImpl() {}
|
||||
TypeNameSpecifierImpl() = default;
|
||||
|
||||
TypeNameSpecifierImpl(llvm::StringRef name, bool is_regex)
|
||||
: m_is_regex(is_regex) {
|
||||
|
|
|
@ -32,7 +32,7 @@ struct ResumeAction {
|
|||
// send a signal to the thread when the action is run or step.
|
||||
class ResumeActionList {
|
||||
public:
|
||||
ResumeActionList() {}
|
||||
ResumeActionList() = default;
|
||||
|
||||
ResumeActionList(lldb::StateType default_action, int signal) {
|
||||
SetDefaultThreadActionIfNeeded(default_action, signal);
|
||||
|
|
|
@ -86,7 +86,7 @@ private:
|
|||
// valid for (start of the function)
|
||||
uint32_t valid_range_offset_end =
|
||||
0; // the offset of the start of the next function
|
||||
FunctionInfo() {}
|
||||
FunctionInfo() = default;
|
||||
};
|
||||
|
||||
struct UnwindHeader {
|
||||
|
|
|
@ -314,7 +314,7 @@ private:
|
|||
|
||||
class TypeListImpl {
|
||||
public:
|
||||
TypeListImpl() {}
|
||||
TypeListImpl() = default;
|
||||
|
||||
void Append(const lldb::TypeImplSP &type) { m_content.push_back(type); }
|
||||
|
||||
|
@ -345,7 +345,7 @@ private:
|
|||
|
||||
class TypeMemberImpl {
|
||||
public:
|
||||
TypeMemberImpl() {}
|
||||
TypeMemberImpl() = default;
|
||||
|
||||
TypeMemberImpl(const lldb::TypeImplSP &type_impl_sp, uint64_t bit_offset,
|
||||
ConstString name, uint32_t bitfield_bit_size = 0,
|
||||
|
@ -437,7 +437,7 @@ private:
|
|||
|
||||
class TypeMemberFunctionImpl {
|
||||
public:
|
||||
TypeMemberFunctionImpl() {}
|
||||
TypeMemberFunctionImpl() = default;
|
||||
|
||||
TypeMemberFunctionImpl(const CompilerType &type, const CompilerDecl &decl,
|
||||
const std::string &name,
|
||||
|
@ -502,7 +502,7 @@ protected:
|
|||
|
||||
class TypeEnumMemberListImpl {
|
||||
public:
|
||||
TypeEnumMemberListImpl() {}
|
||||
TypeEnumMemberListImpl() = default;
|
||||
|
||||
void Append(const lldb::TypeEnumMemberImplSP &type) {
|
||||
m_content.push_back(type);
|
||||
|
|
|
@ -144,7 +144,7 @@ public:
|
|||
RepeatTagsForRange(const std::vector<lldb::addr_t> &tags,
|
||||
TagRange range) const = 0;
|
||||
|
||||
virtual ~MemoryTagManager() {}
|
||||
virtual ~MemoryTagManager() = default;
|
||||
};
|
||||
|
||||
} // namespace lldb_private
|
||||
|
|
|
@ -945,7 +945,7 @@ private:
|
|||
|
||||
class PlatformList {
|
||||
public:
|
||||
PlatformList() {}
|
||||
PlatformList() = default;
|
||||
|
||||
~PlatformList() = default;
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ protected:
|
|||
|
||||
class ProcessAttachInfo : public ProcessInstanceInfo {
|
||||
public:
|
||||
ProcessAttachInfo() {}
|
||||
ProcessAttachInfo() = default;
|
||||
|
||||
ProcessAttachInfo(const ProcessLaunchInfo &launch_info)
|
||||
: m_resume_count(0), m_wait_for_launch(false), m_ignore_existing(true),
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
eStopIDNow = UINT32_MAX
|
||||
};
|
||||
// Constructors and Destructors
|
||||
SectionLoadHistory() {}
|
||||
SectionLoadHistory() = default;
|
||||
|
||||
~SectionLoadHistory() {
|
||||
// Call clear since this takes a lock and clears the section load list in
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace lldb_private {
|
|||
class SectionLoadList {
|
||||
public:
|
||||
// Constructors and Destructors
|
||||
SectionLoadList() {}
|
||||
SectionLoadList() = default;
|
||||
|
||||
SectionLoadList(const SectionLoadList &rhs);
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@ namespace lldb_private {
|
|||
class StackID {
|
||||
public:
|
||||
// Constructors and Destructors
|
||||
StackID()
|
||||
|
||||
{}
|
||||
StackID() = default;
|
||||
|
||||
explicit StackID(lldb::addr_t pc, lldb::addr_t cfa,
|
||||
SymbolContextScope *symbol_scope)
|
||||
|
|
|
@ -119,7 +119,7 @@ private:
|
|||
RegisterContextLLDBSP
|
||||
reg_ctx_lldb_sp; // These are all RegisterContextUnwind's
|
||||
|
||||
Cursor() {}
|
||||
Cursor() = default;
|
||||
|
||||
private:
|
||||
Cursor(const Cursor &) = delete;
|
||||
|
|
|
@ -55,7 +55,7 @@ struct GDBRemotePacket {
|
|||
|
||||
enum Type { ePacketTypeInvalid = 0, ePacketTypeSend, ePacketTypeRecv };
|
||||
|
||||
GDBRemotePacket() {}
|
||||
GDBRemotePacket() = default;
|
||||
|
||||
void Clear() {
|
||||
packet.data.clear();
|
||||
|
|
|
@ -107,7 +107,7 @@ protected:
|
|||
// to that process.
|
||||
class ProcessInstanceInfo : public ProcessInfo {
|
||||
public:
|
||||
ProcessInstanceInfo() {}
|
||||
ProcessInstanceInfo() = default;
|
||||
|
||||
ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid)
|
||||
: ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX),
|
||||
|
@ -162,7 +162,7 @@ typedef std::vector<ProcessInstanceInfo> ProcessInstanceInfoList;
|
|||
|
||||
class ProcessInstanceInfoMatch {
|
||||
public:
|
||||
ProcessInstanceInfoMatch() {}
|
||||
ProcessInstanceInfoMatch() = default;
|
||||
|
||||
ProcessInstanceInfoMatch(const char *process_name,
|
||||
NameMatch process_name_match_type)
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
typedef bool (*ResponseValidatorCallback)(
|
||||
void *baton, const StringExtractorGDBRemote &response);
|
||||
|
||||
StringExtractorGDBRemote() {}
|
||||
StringExtractorGDBRemote() = default;
|
||||
|
||||
StringExtractorGDBRemote(llvm::StringRef str)
|
||||
: StringExtractor(str), m_validator(nullptr) {}
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
class CommandOptions : public Options {
|
||||
public:
|
||||
CommandOptions() {}
|
||||
CommandOptions() = default;
|
||||
|
||||
~CommandOptions() override = default;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
class CommandOptions : public Options {
|
||||
public:
|
||||
CommandOptions() {}
|
||||
CommandOptions() = default;
|
||||
~CommandOptions() override = default;
|
||||
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
|
||||
ExecutionContext *execution_context) override;
|
||||
|
|
|
@ -184,7 +184,7 @@ Section::Section(const lldb::SectionSP &parent_section_sp,
|
|||
m_parent_wp = parent_section_sp;
|
||||
}
|
||||
|
||||
Section::~Section() {}
|
||||
Section::~Section() = default;
|
||||
|
||||
addr_t Section::GetFileAddress() const {
|
||||
SectionSP parent_sp(GetParent());
|
||||
|
|
|
@ -22,7 +22,7 @@ SymbolFileOnDemand::SymbolFileOnDemand(
|
|||
std::unique_ptr<SymbolFile> &&symbol_file)
|
||||
: m_sym_file_impl(std::move(symbol_file)) {}
|
||||
|
||||
SymbolFileOnDemand::~SymbolFileOnDemand() {}
|
||||
SymbolFileOnDemand::~SymbolFileOnDemand() = default;
|
||||
|
||||
uint32_t SymbolFileOnDemand::CalculateAbilities() {
|
||||
// Explicitly allow ability checking to pass though.
|
||||
|
|
Loading…
Reference in New Issue