[lldb] Replace default bodies of special member functions with = default;

Replace default bodies of special member functions with = default;

$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-equals-default' -fix ,

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html

Differential revision: https://reviews.llvm.org/D104041
This commit is contained in:
Jonas Devlieghere 2021-07-02 11:27:37 -07:00
parent 678211de6d
commit fd2433e139
264 changed files with 378 additions and 398 deletions

View File

@ -1,4 +1,4 @@
Checks: '-readability-identifier-naming,modernize-use-default-member-init' Checks: '-readability-identifier-naming,modernize-use-default-member-init,modernize-use-equals-default'
InheritParentConfig: true InheritParentConfig: true
CheckOptions: CheckOptions:
- key: modernize-use-default-member-init.IgnoreMacros - key: modernize-use-default-member-init.IgnoreMacros

View File

@ -237,7 +237,7 @@ public:
uint32_t isa; uint32_t isa;
} info; } info;
Context() {} Context() = default;
void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset) { void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset) {
info_type = eInfoTypeRegisterPlusOffset; info_type = eInfoTypeRegisterPlusOffset;

View File

@ -38,7 +38,7 @@ public:
eTypeBytes eTypeBytes
}; };
Opcode() {} Opcode() = default;
Opcode(uint8_t inst, lldb::ByteOrder order) Opcode(uint8_t inst, lldb::ByteOrder order)
: m_byte_order(order), m_type(eType8) { : m_byte_order(order), m_type(eType8) {

View File

@ -23,7 +23,7 @@ public:
StreamBuffer(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order) StreamBuffer(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order)
: Stream(flags, addr_size, byte_order), m_packet() {} : Stream(flags, addr_size, byte_order), m_packet() {}
~StreamBuffer() override {} ~StreamBuffer() override = default;
void Flush() override { void Flush() override {
// Nothing to do when flushing a buffer based stream... // Nothing to do when flushing a buffer based stream...

View File

@ -17,12 +17,10 @@ namespace lldb_private {
template <class T> class ThreadSafeValue { template <class T> class ThreadSafeValue {
public: public:
// Constructors and Destructors ThreadSafeValue() = default;
ThreadSafeValue() : m_value(), m_mutex() {}
ThreadSafeValue(const T &value) : m_value(value), m_mutex() {} ThreadSafeValue(const T &value) : m_value(value), m_mutex() {}
~ThreadSafeValue() {} ~ThreadSafeValue() = default;
T GetValue() const { T GetValue() const {
T value; T value;

View File

@ -32,12 +32,12 @@ namespace lldb_private {
class Properties { class Properties {
public: public:
Properties() : m_collection_sp() {} Properties() = default;
Properties(const lldb::OptionValuePropertiesSP &collection_sp) Properties(const lldb::OptionValuePropertiesSP &collection_sp)
: m_collection_sp(collection_sp) {} : m_collection_sp(collection_sp) {}
virtual ~Properties() {} virtual ~Properties() = default;
virtual lldb::OptionValuePropertiesSP GetValueProperties() const { virtual lldb::OptionValuePropertiesSP GetValueProperties() const {
// This function is virtual in case subclasses want to lazily implement // This function is virtual in case subclasses want to lazily implement

View File

@ -39,7 +39,7 @@ public:
size_t m_base_element = 0; size_t m_base_element = 0;
size_t m_stride = 0; size_t m_stride = 0;
PointerAsArraySettings() {} PointerAsArraySettings() = default;
PointerAsArraySettings(size_t elem_count, size_t base_elem = 0, PointerAsArraySettings(size_t elem_count, size_t base_elem = 0,
size_t stride = 1) size_t stride = 1)

View File

@ -52,7 +52,7 @@ public:
class Flags { class Flags {
public: public:
Flags() {} Flags() = default;
Flags(const Flags &other) : m_flags(other.m_flags) {} Flags(const Flags &other) : m_flags(other.m_flags) {}

View File

@ -133,7 +133,7 @@ class SyntheticChildren {
public: public:
class Flags { class Flags {
public: public:
Flags() {} Flags() = default;
Flags(const Flags &other) : m_flags(other.m_flags) {} Flags(const Flags &other) : m_flags(other.m_flags) {}

View File

@ -27,7 +27,7 @@ public:
ValueObjectPrinter(ValueObject *valobj, Stream *s, ValueObjectPrinter(ValueObject *valobj, Stream *s,
const DumpValueObjectOptions &options); const DumpValueObjectOptions &options);
~ValueObjectPrinter() {} ~ValueObjectPrinter() = default;
bool PrintValueObject(); bool PrintValueObject();

View File

@ -39,7 +39,7 @@ public:
Expression(ExecutionContextScope &exe_scope); Expression(ExecutionContextScope &exe_scope);
/// Destructor /// Destructor
virtual ~Expression() {} virtual ~Expression() = default;
/// Return the string that the parser should parse. Must be a full /// Return the string that the parser should parse. Must be a full
/// translation unit. /// translation unit.

View File

@ -41,7 +41,7 @@ public:
: m_expr(expr), m_generate_debug_info(generate_debug_info) {} : m_expr(expr), m_generate_debug_info(generate_debug_info) {}
/// Destructor /// Destructor
virtual ~ExpressionParser(){}; virtual ~ExpressionParser() = default;
/// Attempts to find possible command line completions for the given /// Attempts to find possible command line completions for the given
/// expression. /// expression.

View File

@ -36,7 +36,7 @@ public:
ExpressionTypeSystemHelper(LLVMCastKind kind) : m_kind(kind) {} ExpressionTypeSystemHelper(LLVMCastKind kind) : m_kind(kind) {}
~ExpressionTypeSystemHelper() {} ~ExpressionTypeSystemHelper() = default;
protected: protected:
LLVMCastKind m_kind; LLVMCastKind m_kind;

View File

@ -90,7 +90,7 @@ public:
class Entity { class Entity {
public: public:
Entity() {} Entity() = default;
virtual ~Entity() = default; virtual ~Entity() = default;

View File

@ -21,7 +21,7 @@
namespace lldb_private { namespace lldb_private {
class FileCache { class FileCache {
private: private:
FileCache() {} FileCache() = default;
typedef std::map<lldb::user_id_t, lldb::FileUP> FDToFileMap; typedef std::map<lldb::user_id_t, lldb::FileUP> FDToFileMap;

View File

@ -33,8 +33,8 @@ struct SharedCacheImageInfo {
class HostInfoBase { class HostInfoBase {
private: private:
// Static class, unconstructable. // Static class, unconstructable.
HostInfoBase() {} HostInfoBase() = default;
~HostInfoBase() {} ~HostInfoBase() = default;
public: public:
/// A helper function for determining the liblldb location. It receives a /// A helper function for determining the liblldb location. It receives a

View File

@ -27,7 +27,7 @@ public:
HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {} HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {}
explicit HostNativeProcessBase(lldb::process_t process) explicit HostNativeProcessBase(lldb::process_t process)
: m_process(process) {} : m_process(process) {}
virtual ~HostNativeProcessBase() {} virtual ~HostNativeProcessBase() = default;
virtual Status Terminate() = 0; virtual Status Terminate() = 0;
virtual Status GetMainModule(FileSpec &file_spec) const = 0; virtual Status GetMainModule(FileSpec &file_spec) const = 0;

View File

@ -27,9 +27,9 @@ class HostNativeThreadBase {
const HostNativeThreadBase &operator=(const HostNativeThreadBase &) = delete; const HostNativeThreadBase &operator=(const HostNativeThreadBase &) = delete;
public: public:
HostNativeThreadBase(); HostNativeThreadBase() = default;
explicit HostNativeThreadBase(lldb::thread_t thread); explicit HostNativeThreadBase(lldb::thread_t thread);
virtual ~HostNativeThreadBase() {} virtual ~HostNativeThreadBase() = default;
virtual Status Join(lldb::thread_result_t *result) = 0; virtual Status Join(lldb::thread_result_t *result) = 0;
virtual Status Cancel() = 0; virtual Status Cancel() = 0;
@ -45,7 +45,7 @@ protected:
static lldb::thread_result_t THREAD_ROUTINE static lldb::thread_result_t THREAD_ROUTINE
ThreadCreateTrampoline(lldb::thread_arg_t arg); ThreadCreateTrampoline(lldb::thread_arg_t arg);
lldb::thread_t m_thread; lldb::thread_t m_thread = LLDB_INVALID_HOST_THREAD;
lldb::thread_result_t m_result = 0; lldb::thread_result_t m_result = 0;
}; };
} }

View File

@ -33,8 +33,8 @@ private:
class ReadHandle; class ReadHandle;
public: public:
MainLoopBase() {} MainLoopBase() = default;
virtual ~MainLoopBase() {} virtual ~MainLoopBase() = default;
typedef std::unique_ptr<ReadHandle> ReadHandleUP; typedef std::unique_ptr<ReadHandle> ReadHandleUP;

View File

@ -17,7 +17,7 @@ class HostProcess;
class ProcessLauncher { class ProcessLauncher {
public: public:
virtual ~ProcessLauncher() {} virtual ~ProcessLauncher() = default;
virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info,
Status &error) = 0; Status &error) = 0;
}; };

View File

@ -35,7 +35,7 @@ public:
class ProcessRunLocker { class ProcessRunLocker {
public: public:
ProcessRunLocker() {} ProcessRunLocker() = default;
~ProcessRunLocker() { Unlock(); } ~ProcessRunLocker() { Unlock(); }

View File

@ -21,7 +21,7 @@ class Terminal {
public: public:
Terminal(int fd = -1) : m_fd(fd) {} Terminal(int fd = -1) : m_fd(fd) {}
~Terminal() {} ~Terminal() = default;
bool IsATerminal() const; bool IsATerminal() const;

View File

@ -46,7 +46,7 @@ struct SVR4LibraryInfo {
// NativeProcessProtocol // NativeProcessProtocol
class NativeProcessProtocol { class NativeProcessProtocol {
public: public:
virtual ~NativeProcessProtocol() {} virtual ~NativeProcessProtocol() = default;
virtual Status Resume(const ResumeActionList &resume_actions) = 0; virtual Status Resume(const ResumeActionList &resume_actions) = 0;
@ -217,7 +217,7 @@ public:
// Callbacks for low-level process state changes // Callbacks for low-level process state changes
class NativeDelegate { class NativeDelegate {
public: public:
virtual ~NativeDelegate() {} virtual ~NativeDelegate() = default;
virtual void InitializeDelegate(NativeProcessProtocol *process) = 0; virtual void InitializeDelegate(NativeProcessProtocol *process) = 0;

View File

@ -21,7 +21,7 @@ class NativeThreadProtocol {
public: public:
NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid); NativeThreadProtocol(NativeProcessProtocol &process, lldb::tid_t tid);
virtual ~NativeThreadProtocol() {} virtual ~NativeThreadProtocol() = default;
virtual std::string GetName() = 0; virtual std::string GetName() = 0;

View File

@ -33,7 +33,7 @@ class CommandInterpreter;
class CommandInterpreterRunResult { class CommandInterpreterRunResult {
public: public:
CommandInterpreterRunResult() {} CommandInterpreterRunResult() = default;
uint32_t GetNumErrors() const { return m_num_errors; } uint32_t GetNumErrors() const { return m_num_errors; }
@ -100,9 +100,7 @@ public:
m_echo_comment_commands(echo_comments), m_print_results(print_results), m_echo_comment_commands(echo_comments), m_print_results(print_results),
m_print_errors(print_errors), m_add_to_history(add_to_history) {} m_print_errors(print_errors), m_add_to_history(add_to_history) {}
CommandInterpreterRunOptions() CommandInterpreterRunOptions() = default;
{}
void SetSilent(bool silent) { void SetSilent(bool silent) {
LazyBool value = silent ? eLazyBoolNo : eLazyBoolYes; LazyBool value = silent ? eLazyBoolNo : eLazyBoolYes;

View File

@ -60,7 +60,7 @@ public:
eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue) eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue)
}; };
OptionValue() {} OptionValue() = default;
virtual ~OptionValue() = default; virtual ~OptionValue() = default;

View File

@ -254,7 +254,7 @@ public:
class OptionGroupOptions : public Options { class OptionGroupOptions : public Options {
public: public:
OptionGroupOptions() {} OptionGroupOptions() = default;
~OptionGroupOptions() override = default; ~OptionGroupOptions() override = default;

View File

@ -37,6 +37,40 @@ private:
operator=(const ScriptInterpreterLocker &) = delete; operator=(const ScriptInterpreterLocker &) = delete;
}; };
class ExecuteScriptOptions {
public:
ExecuteScriptOptions() = default;
bool GetEnableIO() const { return m_enable_io; }
bool GetSetLLDBGlobals() const { return m_set_lldb_globals; }
// If this is true then any exceptions raised by the script will be
// cleared with PyErr_Clear(). If false then they will be left for
// the caller to clean up
bool GetMaskoutErrors() const { return m_maskout_errors; }
ExecuteScriptOptions &SetEnableIO(bool enable) {
m_enable_io = enable;
return *this;
}
ExecuteScriptOptions &SetSetLLDBGlobals(bool set) {
m_set_lldb_globals = set;
return *this;
}
ExecuteScriptOptions &SetMaskoutErrors(bool maskout) {
m_maskout_errors = maskout;
return *this;
}
private:
bool m_enable_io = true;
bool m_set_lldb_globals = true;
bool m_maskout_errors = true;
};
class ScriptInterpreterIORedirect { class ScriptInterpreterIORedirect {
public: public:
/// Create an IO redirect. If IO is enabled, this will redirects the output /// Create an IO redirect. If IO is enabled, this will redirects the output
@ -92,40 +126,6 @@ public:
~ScriptInterpreter() override = default; ~ScriptInterpreter() override = default;
struct ExecuteScriptOptions {
public:
ExecuteScriptOptions() {}
bool GetEnableIO() const { return m_enable_io; }
bool GetSetLLDBGlobals() const { return m_set_lldb_globals; }
// If this is true then any exceptions raised by the script will be
// cleared with PyErr_Clear(). If false then they will be left for
// the caller to clean up
bool GetMaskoutErrors() const { return m_maskout_errors; }
ExecuteScriptOptions &SetEnableIO(bool enable) {
m_enable_io = enable;
return *this;
}
ExecuteScriptOptions &SetSetLLDBGlobals(bool set) {
m_set_lldb_globals = set;
return *this;
}
ExecuteScriptOptions &SetMaskoutErrors(bool maskout) {
m_maskout_errors = maskout;
return *this;
}
private:
bool m_enable_io = true;
bool m_set_lldb_globals = true;
bool m_maskout_errors = true;
};
virtual bool Interrupt() { return false; } virtual bool Interrupt() { return false; }
virtual bool ExecuteOneLine( virtual bool ExecuteOneLine(

View File

@ -63,7 +63,7 @@ private:
// provides the upper bound of // provides the upper bound of
// function addresses that are described // function addresses that are described
UnwindIndex() {} UnwindIndex() = default;
bool operator<(const CompactUnwindInfo::UnwindIndex &rhs) const { bool operator<(const CompactUnwindInfo::UnwindIndex &rhs) const {
return function_offset < rhs.function_offset; return function_offset < rhs.function_offset;
@ -96,7 +96,7 @@ private:
uint32_t personality_array_offset = 0; uint32_t personality_array_offset = 0;
uint32_t personality_array_count = 0; uint32_t personality_array_count = 0;
UnwindHeader() {} UnwindHeader() = default;
}; };
void ScanIndex(const lldb::ProcessSP &process_sp); void ScanIndex(const lldb::ProcessSP &process_sp);

View File

@ -28,7 +28,7 @@ public:
// Constructors and Destructors // Constructors and Destructors
DeclVendor(DeclVendorKind kind) : m_kind(kind) {} DeclVendor(DeclVendorKind kind) : m_kind(kind) {}
virtual ~DeclVendor() {} virtual ~DeclVendor() = default;
DeclVendorKind GetKind() const { return m_kind; } DeclVendorKind GetKind() const { return m_kind; }

View File

@ -271,7 +271,7 @@ using CallSiteParameterArray = llvm::SmallVector<CallSiteParameter, 0>;
class CallEdge { class CallEdge {
public: public:
enum class AddrType : uint8_t { Call, AfterCall }; enum class AddrType : uint8_t { Call, AfterCall };
virtual ~CallEdge() {} virtual ~CallEdge() = default;
/// Get the callee's definition. /// Get the callee's definition.
/// ///

View File

@ -25,9 +25,9 @@ namespace lldb_private {
class ObjectFileJITDelegate { class ObjectFileJITDelegate {
public: public:
ObjectFileJITDelegate() {} ObjectFileJITDelegate() = default;
virtual ~ObjectFileJITDelegate() {} virtual ~ObjectFileJITDelegate() = default;
virtual lldb::ByteOrder GetByteOrder() const = 0; virtual lldb::ByteOrder GetByteOrder() const = 0;

View File

@ -69,7 +69,7 @@ public:
: m_objfile_sp(std::move(objfile_sp)), m_abilities(0), : m_objfile_sp(std::move(objfile_sp)), m_abilities(0),
m_calculated_abilities(false) {} m_calculated_abilities(false) {}
~SymbolFile() override {} ~SymbolFile() override = default;
/// Get a mask of what this symbol file supports for the object file /// Get a mask of what this symbol file supports for the object file
/// that it was constructed with. /// that it was constructed with.

View File

@ -27,7 +27,7 @@ public:
TaggedASTType() : CompilerType() {} TaggedASTType() : CompilerType() {}
virtual ~TaggedASTType() {} virtual ~TaggedASTType() = default;
TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) { TaggedASTType<C> &operator=(const TaggedASTType<C> &tw) {
CompilerType::operator=(tw); CompilerType::operator=(tw);

View File

@ -51,7 +51,7 @@ public:
SymbolFileType(SymbolFile &symbol_file, const lldb::TypeSP &type_sp); SymbolFileType(SymbolFile &symbol_file, const lldb::TypeSP &type_sp);
~SymbolFileType() {} ~SymbolFileType() = default;
Type *operator->() { return GetType(); } Type *operator->() { return GetType(); }
@ -239,7 +239,7 @@ class TypeImpl {
public: public:
TypeImpl() = default; TypeImpl() = default;
~TypeImpl() {} ~TypeImpl() = default;
TypeImpl(const lldb::TypeSP &type_sp); TypeImpl(const lldb::TypeSP &type_sp);

View File

@ -31,7 +31,7 @@ namespace lldb_private {
/// context to allow functions that take a execution contexts to be called. /// context to allow functions that take a execution contexts to be called.
class ExecutionContextScope { class ExecutionContextScope {
public: public:
virtual ~ExecutionContextScope() {} virtual ~ExecutionContextScope() = default;
virtual lldb::TargetSP CalculateTarget() = 0; virtual lldb::TargetSP CalculateTarget() = 0;

View File

@ -18,7 +18,7 @@ namespace lldb_private {
class InstrumentationRuntimeStopInfo : public StopInfo { class InstrumentationRuntimeStopInfo : public StopInfo {
public: public:
~InstrumentationRuntimeStopInfo() override {} ~InstrumentationRuntimeStopInfo() override = default;
lldb::StopReason GetStopReason() const override { lldb::StopReason GetStopReason() const override {
return lldb::eStopReasonInstrumentation; return lldb::eStopReasonInstrumentation;

View File

@ -223,9 +223,7 @@ class ProcessModID {
friend bool operator==(const ProcessModID &lhs, const ProcessModID &rhs); friend bool operator==(const ProcessModID &lhs, const ProcessModID &rhs);
public: public:
ProcessModID() ProcessModID() = default;
{}
ProcessModID(const ProcessModID &rhs) ProcessModID(const ProcessModID &rhs)
: m_stop_id(rhs.m_stop_id), m_memory_id(rhs.m_memory_id) {} : m_stop_id(rhs.m_stop_id), m_memory_id(rhs.m_memory_id) {}

View File

@ -34,7 +34,7 @@ public:
RegisterCheckpoint(Reason reason) RegisterCheckpoint(Reason reason)
: UserID(0), m_data_sp(), m_reason(reason) {} : UserID(0), m_data_sp(), m_reason(reason) {}
~RegisterCheckpoint() {} ~RegisterCheckpoint() = default;
lldb::DataBufferSP &GetData() { return m_data_sp; } lldb::DataBufferSP &GetData() { return m_data_sp; }

View File

@ -37,7 +37,7 @@ public:
return lldb::ValueObjectSP(); return lldb::ValueObjectSP();
} }
virtual lldb::StackFrameSP GetMostRelevantFrame() { return nullptr; }; virtual lldb::StackFrameSP GetMostRelevantFrame() { return nullptr; };
virtual ~RecognizedStackFrame(){}; virtual ~RecognizedStackFrame() = default;
std::string GetStopDescription() { return m_stop_desc; } std::string GetStopDescription() { return m_stop_desc; }
@ -63,7 +63,7 @@ public:
return ""; return "";
} }
virtual ~StackFrameRecognizer(){}; virtual ~StackFrameRecognizer() = default;
}; };
/// \class ScriptedStackFrameRecognizer /// \class ScriptedStackFrameRecognizer
@ -80,7 +80,7 @@ class ScriptedStackFrameRecognizer : public StackFrameRecognizer {
public: public:
ScriptedStackFrameRecognizer(lldb_private::ScriptInterpreter *interpreter, ScriptedStackFrameRecognizer(lldb_private::ScriptInterpreter *interpreter,
const char *pclass); const char *pclass);
~ScriptedStackFrameRecognizer() override {} ~ScriptedStackFrameRecognizer() override = default;
std::string GetName() override { std::string GetName() override {
return GetPythonClassName(); return GetPythonClassName();

View File

@ -25,7 +25,7 @@ public:
// Constructors and Destructors // Constructors and Destructors
StopInfo(Thread &thread, uint64_t value); StopInfo(Thread &thread, uint64_t value);
virtual ~StopInfo() {} virtual ~StopInfo() = default;
bool IsValid() const; bool IsValid() const;

View File

@ -28,7 +28,7 @@ public:
ThreadCollection(collection threads); ThreadCollection(collection threads);
virtual ~ThreadCollection() {} virtual ~ThreadCollection() = default;
uint32_t GetSize(); uint32_t GetSize();

View File

@ -33,7 +33,7 @@ class ThreadPlanStack {
public: public:
ThreadPlanStack(const Thread &thread, bool make_empty = false); ThreadPlanStack(const Thread &thread, bool make_empty = false);
~ThreadPlanStack() {} ~ThreadPlanStack() = default;
using PlanStack = std::vector<lldb::ThreadPlanSP>; using PlanStack = std::vector<lldb::ThreadPlanSP>;
@ -115,7 +115,7 @@ private:
class ThreadPlanStackMap { class ThreadPlanStackMap {
public: public:
ThreadPlanStackMap(Process &process) : m_process(process) {} ThreadPlanStackMap(Process &process) : m_process(process) {}
~ThreadPlanStackMap() {} ~ThreadPlanStackMap() = default;
// Prune the map using the current_threads list. // Prune the map using the current_threads list.
void Update(ThreadList &current_threads, bool delete_missing, void Update(ThreadList &current_threads, bool delete_missing,

View File

@ -104,7 +104,7 @@ protected:
Signal(const char *name, bool default_suppress, bool default_stop, Signal(const char *name, bool default_suppress, bool default_stop,
bool default_notify, const char *description, const char *alias); bool default_notify, const char *description, const char *alias);
~Signal() {} ~Signal() = default;
}; };
virtual void Reset(); virtual void Reset();

View File

@ -21,7 +21,7 @@ protected:
Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {} Unwind(Thread &thread) : m_thread(thread), m_unwind_mutex() {}
public: public:
virtual ~Unwind() {} virtual ~Unwind() = default;
void Clear() { void Clear() {
std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex); std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);

View File

@ -34,8 +34,8 @@ namespace lldb_private {
/// needed resources in their destructors. /// needed resources in their destructors.
class Baton { class Baton {
public: public:
Baton() {} Baton() = default;
virtual ~Baton() {} virtual ~Baton() = default;
virtual void *data() = 0; virtual void *data() = 0;

View File

@ -48,7 +48,7 @@ public:
/// and be downcast to the DataBuffer pure virtual interface. The virtual /// and be downcast to the DataBuffer pure virtual interface. The virtual
/// destructor ensures that destructing the base class will destruct the /// destructor ensures that destructing the base class will destruct the
/// class that inherited from it correctly. /// class that inherited from it correctly.
virtual ~DataBuffer() {} virtual ~DataBuffer() = default;
/// Get a pointer to the data. /// Get a pointer to the data.
/// ///

View File

@ -101,7 +101,7 @@ class EventDataReceipt : public EventData {
public: public:
EventDataReceipt() : EventData(), m_predicate(false) {} EventDataReceipt() : EventData(), m_predicate(false) {}
~EventDataReceipt() override {} ~EventDataReceipt() override = default;
static ConstString GetFlavorString() { static ConstString GetFlavorString() {
static ConstString g_flavor("Process::ProcessEventData"); static ConstString g_flavor("Process::ProcessEventData");

View File

@ -469,7 +469,7 @@ template <> struct DeserializationHelper<> {
/// The replayer interface. /// The replayer interface.
struct Replayer { struct Replayer {
virtual ~Replayer() {} virtual ~Replayer() = default;
virtual void operator()(Deserializer &deserializer) const = 0; virtual void operator()(Deserializer &deserializer) const = 0;
}; };
@ -714,7 +714,7 @@ protected:
friend llvm::optional_detail::OptionalStorage<InstrumentationData, true>; friend llvm::optional_detail::OptionalStorage<InstrumentationData, true>;
friend llvm::Optional<InstrumentationData>; friend llvm::Optional<InstrumentationData>;
InstrumentationData() {} InstrumentationData() = default;
InstrumentationData(Serializer &serializer, Registry &registry) InstrumentationData(Serializer &serializer, Registry &registry)
: m_serializer(&serializer), m_deserializer(nullptr), : m_serializer(&serializer), m_deserializer(nullptr),
m_registry(&registry) {} m_registry(&registry) {}

View File

@ -45,7 +45,7 @@ public:
m_streams = rhs.m_streams; m_streams = rhs.m_streams;
} }
~StreamTee() override {} ~StreamTee() override = default;
StreamTee &operator=(const StreamTee &rhs) { StreamTee &operator=(const StreamTee &rhs) {
if (this != &rhs) { if (this != &rhs) {

View File

@ -60,7 +60,7 @@ llvm::json::Value toJSON(const TraceStartRequest &packet);
/// jLLDBTraceStop gdb-remote packet /// jLLDBTraceStop gdb-remote packet
/// \{ /// \{
struct TraceStopRequest { struct TraceStopRequest {
TraceStopRequest() {} TraceStopRequest() = default;
TraceStopRequest(llvm::StringRef type, const std::vector<lldb::tid_t> &tids); TraceStopRequest(llvm::StringRef type, const std::vector<lldb::tid_t> &tids);

View File

@ -33,7 +33,7 @@ struct UserID {
UserID(lldb::user_id_t uid = LLDB_INVALID_UID) : m_uid(uid) {} UserID(lldb::user_id_t uid = LLDB_INVALID_UID) : m_uid(uid) {}
/// Destructor. /// Destructor.
~UserID() {} ~UserID() = default;
/// Clears the object state. /// Clears the object state.
/// ///

View File

@ -26,13 +26,13 @@ public:
typedef collection::iterator iterator; typedef collection::iterator iterator;
typedef collection::const_iterator const_iterator; typedef collection::const_iterator const_iterator;
VMRange() {} VMRange() = default;
VMRange(lldb::addr_t start_addr, lldb::addr_t end_addr) VMRange(lldb::addr_t start_addr, lldb::addr_t end_addr)
: m_base_addr(start_addr), : m_base_addr(start_addr),
m_byte_size(end_addr > start_addr ? end_addr - start_addr : 0) {} m_byte_size(end_addr > start_addr ? end_addr - start_addr : 0) {}
~VMRange() {} ~VMRange() = default;
void Clear() { void Clear() {
m_base_addr = 0; m_base_addr = 0;

View File

@ -100,7 +100,7 @@ struct OptionEnumValueElement {
using OptionEnumValues = llvm::ArrayRef<OptionEnumValueElement>; using OptionEnumValues = llvm::ArrayRef<OptionEnumValueElement>;
struct OptionValidator { struct OptionValidator {
virtual ~OptionValidator() {} virtual ~OptionValidator() = default;
virtual bool IsValid(Platform &platform, virtual bool IsValid(Platform &platform,
const ExecutionContext &target) const = 0; const ExecutionContext &target) const = 0;
virtual const char *ShortConditionString() const = 0; virtual const char *ShortConditionString() const = 0;

View File

@ -26,7 +26,7 @@ BreakpointList::BreakpointList(bool is_internal)
: m_mutex(), m_breakpoints(), m_next_break_id(0), : m_mutex(), m_breakpoints(), m_next_break_id(0),
m_is_internal(is_internal) {} m_is_internal(is_internal) {}
BreakpointList::~BreakpointList() {} BreakpointList::~BreakpointList() = default;
break_id_t BreakpointList::Add(BreakpointSP &bp_sp, bool notify) { break_id_t BreakpointList::Add(BreakpointSP &bp_sp, bool notify) {
std::lock_guard<std::recursive_mutex> guard(m_mutex); std::lock_guard<std::recursive_mutex> guard(m_mutex);

View File

@ -21,7 +21,7 @@ BreakpointLocationCollection::BreakpointLocationCollection()
: m_break_loc_collection(), m_collection_mutex() {} : m_break_loc_collection(), m_collection_mutex() {}
// Destructor // Destructor
BreakpointLocationCollection::~BreakpointLocationCollection() {} BreakpointLocationCollection::~BreakpointLocationCollection() = default;
void BreakpointLocationCollection::Add(const BreakpointLocationSP &bp_loc) { void BreakpointLocationCollection::Add(const BreakpointLocationSP &bp_loc) {
std::lock_guard<std::mutex> guard(m_collection_mutex); std::lock_guard<std::mutex> guard(m_collection_mutex);

View File

@ -65,7 +65,7 @@ BreakpointResolver::BreakpointResolver(const BreakpointSP &bkpt,
lldb::addr_t offset) lldb::addr_t offset)
: m_breakpoint(bkpt), m_offset(offset), SubclassID(resolverTy) {} : m_breakpoint(bkpt), m_offset(offset), SubclassID(resolverTy) {}
BreakpointResolver::~BreakpointResolver() {} BreakpointResolver::~BreakpointResolver() = default;
BreakpointResolverSP BreakpointResolver::CreateFromStructuredData( BreakpointResolverSP BreakpointResolver::CreateFromStructuredData(
const StructuredData::Dictionary &resolver_dict, Status &error) { const StructuredData::Dictionary &resolver_dict, Status &error) {

View File

@ -16,7 +16,7 @@ using namespace lldb_private;
BreakpointSiteList::BreakpointSiteList() : m_mutex(), m_bp_site_list() {} BreakpointSiteList::BreakpointSiteList() : m_mutex(), m_bp_site_list() {}
BreakpointSiteList::~BreakpointSiteList() {} BreakpointSiteList::~BreakpointSiteList() = default;
// Add breakpoint site to the list. However, if the element already exists in // Add breakpoint site to the list. However, if the element already exists in
// the list, then we don't add it, and return LLDB_INVALID_BREAK_ID. // the list, then we don't add it, and return LLDB_INVALID_BREAK_ID.

View File

@ -14,10 +14,10 @@ using namespace lldb;
using namespace lldb_private; using namespace lldb_private;
// Stoppoint constructor // Stoppoint constructor
Stoppoint::Stoppoint() {} Stoppoint::Stoppoint() = default;
// Destructor // Destructor
Stoppoint::~Stoppoint() {} Stoppoint::~Stoppoint() = default;
break_id_t Stoppoint::GetID() const { return m_bid; } break_id_t Stoppoint::GetID() const { return m_bid; }

View File

@ -14,7 +14,7 @@ using namespace lldb_private;
WatchpointList::WatchpointList() : m_watchpoints(), m_mutex() {} WatchpointList::WatchpointList() : m_watchpoints(), m_mutex() {}
WatchpointList::~WatchpointList() {} WatchpointList::~WatchpointList() = default;
// Add a watchpoint to the list. // Add a watchpoint to the list.
lldb::watch_id_t WatchpointList::Add(const WatchpointSP &wp_sp, bool notify) { lldb::watch_id_t WatchpointList::Add(const WatchpointSP &wp_sp, bool notify) {

View File

@ -22,7 +22,7 @@ CommandObjectGUI::CommandObjectGUI(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "gui", : CommandObjectParsed(interpreter, "gui",
"Switch into the curses based GUI mode.", "gui") {} "Switch into the curses based GUI mode.", "gui") {}
CommandObjectGUI::~CommandObjectGUI() {} CommandObjectGUI::~CommandObjectGUI() = default;
bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) { bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
#if LLDB_ENABLE_CURSES #if LLDB_ENABLE_CURSES

View File

@ -34,7 +34,7 @@ public:
public: public:
CommandOptions() : Options() {} CommandOptions() : Options() {}
~CommandOptions() override {} ~CommandOptions() override = default;
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
ExecutionContext *execution_context) override { ExecutionContext *execution_context) override {

View File

@ -23,4 +23,4 @@ CommandObjectLanguage::CommandObjectLanguage(CommandInterpreter &interpreter)
LanguageRuntime::InitializeCommands(this); LanguageRuntime::InitializeCommands(this);
} }
CommandObjectLanguage::~CommandObjectLanguage() {} CommandObjectLanguage::~CommandObjectLanguage() = default;

View File

@ -60,7 +60,7 @@ static mode_t ParsePermissionString(llvm::StringRef permissions) {
class OptionPermissions : public OptionGroup { class OptionPermissions : public OptionGroup {
public: public:
OptionPermissions() {} OptionPermissions() = default;
~OptionPermissions() override = default; ~OptionPermissions() override = default;

View File

@ -22,7 +22,7 @@ CommandObjectQuit::CommandObjectQuit(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "quit", "Quit the LLDB debugger.", : CommandObjectParsed(interpreter, "quit", "Quit the LLDB debugger.",
"quit [exit-code]") {} "quit [exit-code]") {}
CommandObjectQuit::~CommandObjectQuit() {} CommandObjectQuit::~CommandObjectQuit() = default;
// returns true if there is at least one alive process is_a_detach will be true // returns true if there is at least one alive process is_a_detach will be true
// if all alive processes will be detached when you quit and false if at least // if all alive processes will be detached when you quit and false if at least

View File

@ -23,7 +23,7 @@ CommandObjectRegexCommand::CommandObjectRegexCommand(
m_entries(), m_is_removable(is_removable) {} m_entries(), m_is_removable(is_removable) {}
// Destructor // Destructor
CommandObjectRegexCommand::~CommandObjectRegexCommand() {} CommandObjectRegexCommand::~CommandObjectRegexCommand() = default;
bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command, bool CommandObjectRegexCommand::DoExecute(llvm::StringRef command,
CommandReturnObject &result) { CommandReturnObject &result) {

View File

@ -84,7 +84,7 @@ CommandObjectScript::CommandObjectScript(CommandInterpreter &interpreter)
"results. Start the interactive interpreter if no code is supplied.", "results. Start the interactive interpreter if no code is supplied.",
"script [--language <scripting-language> --] [<script-code>]") {} "script [--language <scripting-language> --] [<script-code>]") {}
CommandObjectScript::~CommandObjectScript() {} CommandObjectScript::~CommandObjectScript() = default;
bool CommandObjectScript::DoExecute(llvm::StringRef command, bool CommandObjectScript::DoExecute(llvm::StringRef command,
CommandReturnObject &result) { CommandReturnObject &result) {

View File

@ -158,9 +158,9 @@ static constexpr OptionEnumValueElement g_dependents_enumaration[] = {
class OptionGroupDependents : public OptionGroup { class OptionGroupDependents : public OptionGroup {
public: public:
OptionGroupDependents() {} OptionGroupDependents() = default;
~OptionGroupDependents() override {} ~OptionGroupDependents() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override { llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
return llvm::makeArrayRef(g_target_dependents_options); return llvm::makeArrayRef(g_target_dependents_options);

View File

@ -20,7 +20,7 @@ CommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "version", : CommandObjectParsed(interpreter, "version",
"Show the LLDB debugger version.", "version") {} "Show the LLDB debugger version.", "version") {}
CommandObjectVersion::~CommandObjectVersion() {} CommandObjectVersion::~CommandObjectVersion() = default;
bool CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) { bool CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) {
if (args.GetArgumentCount() == 0) { if (args.GetArgumentCount() == 0) {

View File

@ -41,7 +41,7 @@ AddressRange::AddressRange(const lldb::SectionSP &section, addr_t offset,
AddressRange::AddressRange(const Address &so_addr, addr_t byte_size) AddressRange::AddressRange(const Address &so_addr, addr_t byte_size)
: m_base_addr(so_addr), m_byte_size(byte_size) {} : m_base_addr(so_addr), m_byte_size(byte_size) {}
AddressRange::~AddressRange() {} AddressRange::~AddressRange() = default;
bool AddressRange::Contains(const Address &addr) const { bool AddressRange::Contains(const Address &addr) const {
SectionSP range_sect_sp = GetBaseAddress().GetSection(); SectionSP range_sect_sp = GetBaseAddress().GetSection();

View File

@ -17,9 +17,9 @@ class ModuleList;
using namespace lldb_private; using namespace lldb_private;
// AddressResolver: // AddressResolver:
AddressResolver::AddressResolver() {} AddressResolver::AddressResolver() = default;
AddressResolver::~AddressResolver() {} AddressResolver::~AddressResolver() = default;
void AddressResolver::ResolveAddressInModules(SearchFilter &filter, void AddressResolver::ResolveAddressInModules(SearchFilter &filter,
ModuleList &modules) { ModuleList &modules) {

View File

@ -32,7 +32,7 @@ AddressResolverFileLine::AddressResolverFileLine(
SourceLocationSpec location_spec) SourceLocationSpec location_spec)
: AddressResolver(), m_src_location_spec(location_spec) {} : AddressResolver(), m_src_location_spec(location_spec) {}
AddressResolverFileLine::~AddressResolverFileLine() {} AddressResolverFileLine::~AddressResolverFileLine() = default;
Searcher::CallbackReturn Searcher::CallbackReturn
AddressResolverFileLine::SearchCallback(SearchFilter &filter, AddressResolverFileLine::SearchCallback(SearchFilter &filter,

View File

@ -29,7 +29,7 @@ FileLineResolver::FileLineResolver(const FileSpec &file_spec, uint32_t line_no,
: Searcher(), m_file_spec(file_spec), m_line_number(line_no), : Searcher(), m_file_spec(file_spec), m_line_number(line_no),
m_inlines(check_inlines) {} m_inlines(check_inlines) {}
FileLineResolver::~FileLineResolver() {} FileLineResolver::~FileLineResolver() = default;
Searcher::CallbackReturn Searcher::CallbackReturn
FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context, FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context,

View File

@ -13,7 +13,7 @@ using namespace lldb_private;
ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp) ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
: m_module_wp(module_sp) {} : m_module_wp(module_sp) {}
ModuleChild::~ModuleChild() {} ModuleChild::~ModuleChild() = default;
const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) { const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
if (this != &rhs) if (this != &rhs)

View File

@ -38,7 +38,7 @@ typedef bool (*PluginInitCallback)();
typedef void (*PluginTermCallback)(); typedef void (*PluginTermCallback)();
struct PluginInfo { struct PluginInfo {
PluginInfo() {} PluginInfo() = default;
llvm::sys::DynamicLibrary library; llvm::sys::DynamicLibrary library;
PluginInitCallback plugin_init_callback = nullptr; PluginInitCallback plugin_init_callback = nullptr;

View File

@ -61,7 +61,7 @@ SourceManager::SourceManager(const DebuggerSP &debugger_sp)
m_debugger_wp(debugger_sp) {} m_debugger_wp(debugger_sp) {}
// Destructor // Destructor
SourceManager::~SourceManager() {} SourceManager::~SourceManager() = default;
SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) { SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
if (!file_spec) if (!file_spec)

View File

@ -43,7 +43,7 @@ StreamFile::StreamFile(const char *path, File::OpenOptions options,
} }
} }
StreamFile::~StreamFile() {} StreamFile::~StreamFile() = default;
void StreamFile::Flush() { m_file_sp->Flush(); } void StreamFile::Flush() { m_file_sp->Flush(); }

View File

@ -106,7 +106,7 @@ ValueObject::ValueObject(ExecutionContextScope *exe_scope,
} }
// Destructor // Destructor
ValueObject::~ValueObject() {} ValueObject::~ValueObject() = default;
bool ValueObject::UpdateValueIfNeeded(bool update_format) { bool ValueObject::UpdateValueIfNeeded(bool update_format) {
@ -2839,7 +2839,7 @@ ValueObject::EvaluationPoint::EvaluationPoint(
const ValueObject::EvaluationPoint &rhs) const ValueObject::EvaluationPoint &rhs)
: m_mod_id(), m_exe_ctx_ref(rhs.m_exe_ctx_ref), m_needs_update(true) {} : m_mod_id(), m_exe_ctx_ref(rhs.m_exe_ctx_ref), m_needs_update(true) {}
ValueObject::EvaluationPoint::~EvaluationPoint() {} ValueObject::EvaluationPoint::~EvaluationPoint() = default;
// This function checks the EvaluationPoint against the current process state. // This function checks the EvaluationPoint against the current process state.
// If the current state matches the evaluation point, or the evaluation point // If the current state matches the evaluation point, or the evaluation point

View File

@ -36,7 +36,7 @@ ValueObjectCast::ValueObjectCast(ValueObject &parent, ConstString name,
m_value.SetCompilerType(cast_type); m_value.SetCompilerType(cast_type);
} }
ValueObjectCast::~ValueObjectCast() {} ValueObjectCast::~ValueObjectCast() = default;
CompilerType ValueObjectCast::GetCompilerTypeImpl() { return m_cast_type; } CompilerType ValueObjectCast::GetCompilerTypeImpl() { return m_cast_type; }

View File

@ -43,7 +43,7 @@ ValueObjectChild::ValueObjectChild(
SetLanguageFlags(language_flags); SetLanguageFlags(language_flags);
} }
ValueObjectChild::~ValueObjectChild() {} ValueObjectChild::~ValueObjectChild() = default;
lldb::ValueType ValueObjectChild::GetValueType() const { lldb::ValueType ValueObjectChild::GetValueType() const {
return m_parent->GetValueType(); return m_parent->GetValueType();

View File

@ -193,7 +193,7 @@ ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
m_error = m_value.GetValueAsData(&exe_ctx, m_data, module); m_error = m_value.GetValueAsData(&exe_ctx, m_data, module);
} }
ValueObjectConstResult::~ValueObjectConstResult() {} ValueObjectConstResult::~ValueObjectConstResult() = default;
CompilerType ValueObjectConstResult::GetCompilerTypeImpl() { CompilerType ValueObjectConstResult::GetCompilerTypeImpl() {
return m_value.GetCompilerType(); return m_value.GetCompilerType();

View File

@ -27,7 +27,7 @@ ValueObjectConstResultCast::ValueObjectConstResultCast(
m_name = name; m_name = name;
} }
ValueObjectConstResultCast::~ValueObjectConstResultCast() {} ValueObjectConstResultCast::~ValueObjectConstResultCast() = default;
lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) { lldb::ValueObjectSP ValueObjectConstResultCast::Dereference(Status &error) {
return m_impl.Dereference(error); return m_impl.Dereference(error);

View File

@ -34,7 +34,7 @@ ValueObjectConstResultChild::ValueObjectConstResultChild(
m_name = name; m_name = name;
} }
ValueObjectConstResultChild::~ValueObjectConstResultChild() {} ValueObjectConstResultChild::~ValueObjectConstResultChild() = default;
lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) { lldb::ValueObjectSP ValueObjectConstResultChild::Dereference(Status &error) {
return m_impl.Dereference(error); return m_impl.Dereference(error);

View File

@ -106,7 +106,7 @@ ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
} }
} }
ValueObjectMemory::~ValueObjectMemory() {} ValueObjectMemory::~ValueObjectMemory() = default;
CompilerType ValueObjectMemory::GetCompilerTypeImpl() { CompilerType ValueObjectMemory::GetCompilerTypeImpl() {
if (m_type_sp) if (m_type_sp)

View File

@ -60,7 +60,7 @@ ValueObjectRegisterSet::ValueObjectRegisterSet(ExecutionContextScope *exe_scope,
} }
} }
ValueObjectRegisterSet::~ValueObjectRegisterSet() {} ValueObjectRegisterSet::~ValueObjectRegisterSet() = default;
CompilerType ValueObjectRegisterSet::GetCompilerTypeImpl() { CompilerType ValueObjectRegisterSet::GetCompilerTypeImpl() {
return CompilerType(); return CompilerType();
@ -193,7 +193,7 @@ ValueObjectRegister::ValueObjectRegister(ExecutionContextScope *exe_scope,
ConstructObject(reg_num); ConstructObject(reg_num);
} }
ValueObjectRegister::~ValueObjectRegister() {} ValueObjectRegister::~ValueObjectRegister() = default;
CompilerType ValueObjectRegister::GetCompilerTypeImpl() { CompilerType ValueObjectRegister::GetCompilerTypeImpl() {
if (!m_compiler_type.IsValid()) { if (!m_compiler_type.IsValid()) {

View File

@ -63,7 +63,7 @@ ValueObjectVariable::ValueObjectVariable(ExecutionContextScope *exe_scope,
m_name = var_sp->GetName(); m_name = var_sp->GetName();
} }
ValueObjectVariable::~ValueObjectVariable() {} ValueObjectVariable::~ValueObjectVariable() = default;
CompilerType ValueObjectVariable::GetCompilerTypeImpl() { CompilerType ValueObjectVariable::GetCompilerTypeImpl() {
Type *var_type = m_variable_sp->GetType(); Type *var_type = m_variable_sp->GetType();

View File

@ -29,13 +29,13 @@ using namespace lldb_private;
TypeFormatImpl::TypeFormatImpl(const Flags &flags) : m_flags(flags) {} TypeFormatImpl::TypeFormatImpl(const Flags &flags) : m_flags(flags) {}
TypeFormatImpl::~TypeFormatImpl() {} TypeFormatImpl::~TypeFormatImpl() = default;
TypeFormatImpl_Format::TypeFormatImpl_Format(lldb::Format f, TypeFormatImpl_Format::TypeFormatImpl_Format(lldb::Format f,
const TypeFormatImpl::Flags &flags) const TypeFormatImpl::Flags &flags)
: TypeFormatImpl(flags), m_format(f) {} : TypeFormatImpl(flags), m_format(f) {}
TypeFormatImpl_Format::~TypeFormatImpl_Format() {} TypeFormatImpl_Format::~TypeFormatImpl_Format() = default;
bool TypeFormatImpl_Format::FormatObject(ValueObject *valobj, bool TypeFormatImpl_Format::FormatObject(ValueObject *valobj,
std::string &dest) const { std::string &dest) const {
@ -134,7 +134,7 @@ TypeFormatImpl_EnumType::TypeFormatImpl_EnumType(
ConstString type_name, const TypeFormatImpl::Flags &flags) ConstString type_name, const TypeFormatImpl::Flags &flags)
: TypeFormatImpl(flags), m_enum_type(type_name), m_types() {} : TypeFormatImpl(flags), m_enum_type(type_name), m_types() {}
TypeFormatImpl_EnumType::~TypeFormatImpl_EnumType() {} TypeFormatImpl_EnumType::~TypeFormatImpl_EnumType() = default;
bool TypeFormatImpl_EnumType::FormatObject(ValueObject *valobj, bool TypeFormatImpl_EnumType::FormatObject(ValueObject *valobj,
std::string &dest) const { std::string &dest) const {

View File

@ -26,7 +26,7 @@
using namespace lldb; using namespace lldb;
using namespace lldb_private; using namespace lldb_private;
TypeSummaryOptions::TypeSummaryOptions() {} TypeSummaryOptions::TypeSummaryOptions() = default;
lldb::LanguageType TypeSummaryOptions::GetLanguage() const { return m_lang; } lldb::LanguageType TypeSummaryOptions::GetLanguage() const { return m_lang; }

View File

@ -143,7 +143,7 @@ ScriptedSyntheticChildren::FrontEnd::FrontEnd(std::string pclass,
m_python_class.c_str(), backend.GetSP()); m_python_class.c_str(), backend.GetSP());
} }
ScriptedSyntheticChildren::FrontEnd::~FrontEnd() {} ScriptedSyntheticChildren::FrontEnd::~FrontEnd() = default;
lldb::ValueObjectSP lldb::ValueObjectSP
ScriptedSyntheticChildren::FrontEnd::GetChildAtIndex(size_t idx) { ScriptedSyntheticChildren::FrontEnd::GetChildAtIndex(size_t idx) {

View File

@ -67,7 +67,7 @@ DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp,
} }
// Destructor // Destructor
DWARFExpression::~DWARFExpression() {} DWARFExpression::~DWARFExpression() = default;
bool DWARFExpression::IsValid() const { return m_data.GetByteSize() > 0; } bool DWARFExpression::IsValid() const { return m_data.GetByteSize() > 0; }

View File

@ -13,7 +13,7 @@
using namespace lldb_private; using namespace lldb_private;
ExpressionVariable::~ExpressionVariable() {} ExpressionVariable::~ExpressionVariable() = default;
uint8_t *ExpressionVariable::GetValueBytes() { uint8_t *ExpressionVariable::GetValueBytes() {
llvm::Optional<uint64_t> byte_size = m_frozen_sp->GetByteSize(); llvm::Optional<uint64_t> byte_size = m_frozen_sp->GetByteSize();
@ -28,7 +28,7 @@ uint8_t *ExpressionVariable::GetValueBytes() {
return nullptr; return nullptr;
} }
PersistentExpressionState::~PersistentExpressionState() {} PersistentExpressionState::~PersistentExpressionState() = default;
lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) { lldb::addr_t PersistentExpressionState::LookupSymbol(ConstString name) {
SymbolMap::iterator si = m_symbol_map.find(name.GetCString()); SymbolMap::iterator si = m_symbol_map.find(name.GetCString());

View File

@ -496,7 +496,7 @@ IRExecutionUnit::~IRExecutionUnit() {
IRExecutionUnit::MemoryManager::MemoryManager(IRExecutionUnit &parent) IRExecutionUnit::MemoryManager::MemoryManager(IRExecutionUnit &parent)
: m_default_mm_up(new llvm::SectionMemoryManager()), m_parent(parent) {} : m_default_mm_up(new llvm::SectionMemoryManager()), m_parent(parent) {}
IRExecutionUnit::MemoryManager::~MemoryManager() {} IRExecutionUnit::MemoryManager::~MemoryManager() = default;
lldb::SectionType IRExecutionUnit::GetSectionTypeFromSectionName( lldb::SectionType IRExecutionUnit::GetSectionTypeFromSectionName(
const llvm::StringRef &name, IRExecutionUnit::AllocationKind alloc_kind) { const llvm::StringRef &name, IRExecutionUnit::AllocationKind alloc_kind) {

View File

@ -122,7 +122,7 @@ public:
m_stack_pointer = stack_frame_top; m_stack_pointer = stack_frame_top;
} }
~InterpreterStackFrame() {} ~InterpreterStackFrame() = default;
void Jump(const BasicBlock *bb) { void Jump(const BasicBlock *bb) {
m_prev_bb = m_bb; m_prev_bb = m_bb;

View File

@ -57,7 +57,7 @@ UserExpression::UserExpression(ExecutionContextScope &exe_scope,
m_expr_prefix(std::string(prefix)), m_language(language), m_expr_prefix(std::string(prefix)), m_language(language),
m_desired_type(desired_type), m_options(options) {} m_desired_type(desired_type), m_options(options) {}
UserExpression::~UserExpression() {} UserExpression::~UserExpression() = default;
void UserExpression::InstallContext(ExecutionContext &exe_ctx) { void UserExpression::InstallContext(ExecutionContext &exe_ctx) {
m_jit_process_wp = exe_ctx.GetProcessSP(); m_jit_process_wp = exe_ctx.GetProcessSP();

View File

@ -17,9 +17,6 @@
using namespace lldb; using namespace lldb;
using namespace lldb_private; using namespace lldb_private;
HostNativeThreadBase::HostNativeThreadBase()
: m_thread(LLDB_INVALID_HOST_THREAD) {}
HostNativeThreadBase::HostNativeThreadBase(thread_t thread) HostNativeThreadBase::HostNativeThreadBase(thread_t thread)
: m_thread(thread), m_result(0) {} : m_thread(thread), m_result(0) {}

View File

@ -18,7 +18,7 @@ HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {}
HostProcess::HostProcess(lldb::process_t process) HostProcess::HostProcess(lldb::process_t process)
: m_native_process(new HostNativeProcess(process)) {} : m_native_process(new HostNativeProcess(process)) {}
HostProcess::~HostProcess() {} HostProcess::~HostProcess() = default;
Status HostProcess::Terminate() { return m_native_process->Terminate(); } Status HostProcess::Terminate() { return m_native_process->Terminate(); }

View File

@ -22,7 +22,7 @@ NativeRegisterContext::NativeRegisterContext(NativeThreadProtocol &thread)
: m_thread(thread) {} : m_thread(thread) {}
// Destructor // Destructor
NativeRegisterContext::~NativeRegisterContext() {} NativeRegisterContext::~NativeRegisterContext() = default;
// FIXME revisit invalidation, process stop ids, etc. Right now we don't // FIXME revisit invalidation, process stop ids, etc. Right now we don't
// support caching in NativeRegisterContext. We can do this later by utilizing // support caching in NativeRegisterContext. We can do this later by utilizing

View File

@ -29,7 +29,7 @@ int posix_openpt(int flags);
using namespace lldb_private; using namespace lldb_private;
// PseudoTerminal constructor // PseudoTerminal constructor
PseudoTerminal::PseudoTerminal() {} PseudoTerminal::PseudoTerminal() = default;
// Destructor // Destructor
// //

View File

@ -93,7 +93,7 @@ SocketAddress::SocketAddress(const struct addrinfo *addr_info) {
} }
// Destructor // Destructor
SocketAddress::~SocketAddress() {} SocketAddress::~SocketAddress() = default;
void SocketAddress::Clear() { void SocketAddress::Clear() {
memset(&m_socket_addr, 0, sizeof(m_socket_addr)); memset(&m_socket_addr, 0, sizeof(m_socket_addr));

View File

@ -92,7 +92,7 @@ TerminalState::TerminalState()
} }
// Destructor // Destructor
TerminalState::~TerminalState() {} TerminalState::~TerminalState() = default;
void TerminalState::Clear() { void TerminalState::Clear() {
m_tty.Clear(); m_tty.Clear();
@ -190,10 +190,10 @@ bool TerminalState::ProcessGroupIsValid() const {
} }
// Constructor // Constructor
TerminalStateSwitcher::TerminalStateSwitcher() {} TerminalStateSwitcher::TerminalStateSwitcher() = default;
// Destructor // Destructor
TerminalStateSwitcher::~TerminalStateSwitcher() {} TerminalStateSwitcher::~TerminalStateSwitcher() = default;
// Returns the number of states that this switcher contains // Returns the number of states that this switcher contains
uint32_t TerminalStateSwitcher::GetNumberOfStates() const { uint32_t TerminalStateSwitcher::GetNumberOfStates() const {

Some files were not shown because too many files have changed in this diff Show More