[lldb] Use C++11 default member initializers

This converts a default constructor's member initializers into C++11
default member initializers. This patch was automatically generated with
clang-tidy and the modernize-use-default-member-init check.

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

This is a mass-refactoring patch and this commit will be added to
.git-blame-ignore-revs.

Differential revision: https://reviews.llvm.org/D103483
This commit is contained in:
Jonas Devlieghere 2021-06-09 09:25:29 -07:00
parent 9b496c2373
commit 9494c510af
213 changed files with 859 additions and 1068 deletions

View File

@ -1,2 +1,7 @@
Checks: '-readability-identifier-naming'
Checks: '-readability-identifier-naming,modernize-use-default-member-init'
InheritParentConfig: true
CheckOptions:
- key: modernize-use-default-member-init.IgnoreMacros
value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '1'

View File

@ -87,7 +87,7 @@ private:
void AppendVariables(bool can_create, bool get_parent_variables,
lldb_private::VariableList *var_list);
lldb_private::Block *m_opaque_ptr;
lldb_private::Block *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -77,7 +77,7 @@ protected:
private:
lldb::BroadcasterSP m_opaque_sp;
lldb_private::Broadcaster *m_opaque_ptr;
lldb_private::Broadcaster *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -75,8 +75,8 @@ private:
SBCommunication(const SBCommunication &) = delete;
const SBCommunication &operator=(const SBCommunication &) = delete;
lldb_private::Communication *m_opaque;
bool m_opaque_owned;
lldb_private::Communication *m_opaque = nullptr;
bool m_opaque_owned = false;
};
} // namespace lldb

View File

@ -87,7 +87,7 @@ private:
void reset(lldb_private::CompileUnit *lldb_object_ptr);
lldb_private::CompileUnit *m_opaque_ptr;
lldb_private::CompileUnit *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -79,7 +79,7 @@ protected:
private:
mutable lldb::EventSP m_event_sp;
mutable lldb_private::Event *m_opaque_ptr;
mutable lldb_private::Event *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -74,7 +74,7 @@ private:
SBFunction(lldb_private::Function *lldb_object_ptr);
lldb_private::Function *m_opaque_ptr;
lldb_private::Function *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -100,7 +100,7 @@ private:
void reset(lldb::ListenerSP listener_sp);
lldb::ListenerSP m_opaque_sp;
lldb_private::Listener *m_unused_ptr;
lldb_private::Listener *m_unused_ptr = nullptr;
};
} // namespace lldb

View File

@ -105,7 +105,7 @@ private:
SBStream(const SBStream &) = delete;
const SBStream &operator=(const SBStream &) = delete;
std::unique_ptr<lldb_private::Stream> m_opaque_up;
bool m_is_file;
bool m_is_file = false;
};
} // namespace lldb

View File

@ -78,7 +78,7 @@ private:
void SetSymbol(lldb_private::Symbol *lldb_object_ptr);
lldb_private::Symbol *m_opaque_ptr;
lldb_private::Symbol *m_opaque_ptr = nullptr;
};
} // namespace lldb

View File

@ -43,9 +43,7 @@ public:
| eCondition | eAutoContinue)
};
struct CommandData {
CommandData()
: user_source(), script_source(),
interpreter(lldb::eScriptLanguageNone), stop_on_error(true) {}
CommandData() : user_source(), script_source() {}
CommandData(const StringList &user_source, lldb::ScriptLanguage interp)
: user_source(user_source), script_source(), interpreter(interp),
@ -63,9 +61,10 @@ public:
StringList user_source;
std::string script_source;
enum lldb::ScriptLanguage
interpreter; // eScriptLanguageNone means command interpreter.
bool stop_on_error;
enum lldb::ScriptLanguage interpreter =
lldb::eScriptLanguageNone; // eScriptLanguageNone means command
// interpreter.
bool stop_on_error = true;
private:
enum class OptionNames : uint32_t {

View File

@ -33,7 +33,7 @@ public:
void SetID(lldb::break_id_t bid);
protected:
lldb::break_id_t m_bid;
lldb::break_id_t m_bid = LLDB_INVALID_BREAK_ID;
private:
// For Stoppoint only

View File

@ -37,13 +37,14 @@ public:
void Clear();
// Member variables
Event *event; // This is the event, the callback can modify this to indicate
// the meaning of the breakpoint hit
Event *event = nullptr; // This is the event, the callback can modify this to
// indicate the meaning of the breakpoint hit
ExecutionContextRef
exe_ctx_ref; // This tells us where we have stopped, what thread.
bool is_synchronous; // Is the callback being executed synchronously with the
// breakpoint,
// or asynchronously as the event is retrieved?
bool is_synchronous =
false; // Is the callback being executed synchronously with the
// breakpoint,
// or asynchronously as the event is retrieved?
};
} // namespace lldb_private

View File

@ -198,7 +198,7 @@ protected:
wp_collection m_watchpoints;
mutable std::recursive_mutex m_mutex;
lldb::watch_id_t m_next_wp_id;
lldb::watch_id_t m_next_wp_id = 0;
};
} // namespace lldb_private

View File

@ -166,13 +166,13 @@ public:
lldb::user_id_t watch_id);
struct CommandData {
CommandData() : user_source(), script_source(), stop_on_error(true) {}
CommandData() : user_source(), script_source() {}
~CommandData() = default;
StringList user_source;
std::string script_source;
bool stop_on_error;
bool stop_on_error = true;
};
class CommandBaton : public TypedBaton<CommandData> {
@ -191,7 +191,7 @@ private:
// For WatchpointOptions only
WatchpointHitCallback m_callback; // This is the callback function pointer
lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback
bool m_callback_is_synchronous;
bool m_callback_is_synchronous = false;
std::unique_ptr<ThreadSpec>
m_thread_spec_up; // Thread for which this watchpoint will take
};

View File

@ -116,7 +116,7 @@ public:
///
/// Initialize with a invalid section (NULL) and an invalid offset
/// (LLDB_INVALID_ADDRESS).
Address() : m_section_wp(), m_offset(LLDB_INVALID_ADDRESS) {}
Address() : m_section_wp() {}
/// Copy constructor
///
@ -487,7 +487,8 @@ public:
protected:
// Member variables.
lldb::SectionWP m_section_wp; ///< The section for the address, can be NULL.
lldb::addr_t m_offset; ///< Offset into section if \a m_section_wp is valid...
lldb::addr_t m_offset = LLDB_INVALID_ADDRESS; ///< Offset into section if \a
///< m_section_wp is valid...
// Returns true if the m_section_wp once had a reference to a valid section
// shared pointer, but no longer does. This can happen if we have an address

View File

@ -239,7 +239,7 @@ public:
protected:
// Member variables
Address m_base_addr; ///< The section offset base address of this range.
lldb::addr_t m_byte_size; ///< The size in bytes of this address range.
lldb::addr_t m_byte_size = 0; ///< The size in bytes of this address range.
};
// bool operator== (const AddressRange& lhs, const AddressRange& rhs);

View File

@ -24,7 +24,7 @@ namespace lldb_private {
class Declaration {
public:
/// Default constructor.
Declaration() : m_file(), m_line(0), m_column(LLDB_INVALID_COLUMN_NUMBER) {}
Declaration() : m_file() {}
/// Construct with file specification, and optional line and column.
///
@ -182,10 +182,10 @@ protected:
FileSpec m_file;
/// Non-zero values indicates a valid line number, zero indicates no line
/// number information is available.
uint32_t m_line;
uint32_t m_line = 0;
/// Non-zero values indicates a valid column number, zero indicates no column
/// information is available.
uint16_t m_column;
uint16_t m_column = LLDB_INVALID_COLUMN_NUMBER;
};
bool operator==(const Declaration &lhs, const Declaration &rhs);

View File

@ -454,10 +454,10 @@ protected:
struct SourceLine {
FileSpec file;
uint32_t line;
uint32_t column;
uint32_t line = LLDB_INVALID_LINE_NUMBER;
uint32_t column = 0;
SourceLine() : file(), line(LLDB_INVALID_LINE_NUMBER), column(0) {}
SourceLine() : file() {}
bool operator==(const SourceLine &rhs) const {
return file == rhs.file && line == rhs.line && rhs.column == column;
@ -476,14 +476,12 @@ protected:
// index of the "current" source line, if we want to highlight that when
// displaying the source lines. (as opposed to the surrounding source
// lines provided to give context)
size_t current_source_line;
size_t current_source_line = -1;
// Whether to print a blank line at the end of the source lines.
bool print_source_context_end_eol;
bool print_source_context_end_eol = true;
SourceLinesToDisplay()
: lines(), current_source_line(-1), print_source_context_end_eol(true) {
}
SourceLinesToDisplay() : lines() {}
};
// Get the function's declaration line number, hopefully a line number

View File

@ -182,8 +182,8 @@ public:
} InfoType;
struct Context {
ContextType type;
enum InfoType info_type;
ContextType type = eContextInvalid;
enum InfoType info_type = eInfoTypeNoArgs;
union {
struct RegisterPlusOffset {
RegisterInfo reg; // base register
@ -237,7 +237,7 @@ public:
uint32_t isa;
} info;
Context() : type(eContextInvalid), info_type(eInfoTypeNoArgs) {}
Context() {}
void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset) {
info_type = eInfoTypeRegisterPlusOffset;

View File

@ -28,8 +28,8 @@ class FileLineResolver : public Searcher {
public:
FileLineResolver()
: m_file_spec(),
m_line_number(UINT32_MAX), // Set this to zero for all lines in a file
m_sc_list(), m_inlines(true) {}
// Set this to zero for all lines in a file
m_sc_list() {}
FileLineResolver(const FileSpec &resolver, uint32_t line_no,
bool check_inlines);
@ -52,10 +52,11 @@ public:
protected:
FileSpec m_file_spec; // This is the file spec we are looking for.
uint32_t m_line_number; // This is the line number that we are looking for.
uint32_t m_line_number =
UINT32_MAX; // This is the line number that we are looking for.
SymbolContextList m_sc_list;
bool m_inlines; // This determines whether the resolver looks for inlined
// functions or not.
bool m_inlines = true; // This determines whether the resolver looks for
// inlined functions or not.
private:
FileLineResolver(const FileLineResolver &) = delete;

View File

@ -128,7 +128,7 @@ public:
constexpr Definition(const char *name, const FormatEntity::Entry::Type t,
const uint64_t data)
: name(name), string(nullptr), type(t), data(data) {}
: name(name), type(t), data(data) {}
constexpr Definition(const char *name, const FormatEntity::Entry::Type t,
const uint64_t num_children,
@ -148,8 +148,7 @@ public:
Entry(Type t = Type::Invalid, const char *s = nullptr,
const char *f = nullptr)
: string(s ? s : ""), printf_format(f ? f : ""), children(), type(t),
fmt(lldb::eFormatDefault), number(0), deref(false) {}
: string(s ? s : ""), printf_format(f ? f : ""), children(), type(t) {}
Entry(llvm::StringRef s);
Entry(char ch);
@ -202,9 +201,9 @@ public:
std::string printf_format;
std::vector<Entry> children;
Type type;
lldb::Format fmt;
lldb::addr_t number;
bool deref;
lldb::Format fmt = lldb::eFormatDefault;
lldb::addr_t number = 0;
bool deref = false;
};
static bool Format(const Entry &entry, Stream &s, const SymbolContext *sc,

View File

@ -101,14 +101,14 @@ public:
lldb::addr_t m_dynamic;
};
LoadedModuleInfoList() : m_list(), m_link_map(LLDB_INVALID_ADDRESS) {}
LoadedModuleInfoList() : m_list() {}
void add(const LoadedModuleInfo &mod) { m_list.push_back(mod); }
void clear() { m_list.clear(); }
std::vector<LoadedModuleInfo> m_list;
lldb::addr_t m_link_map;
lldb::addr_t m_link_map = LLDB_INVALID_ADDRESS;
};
} // namespace lldb_private

View File

@ -47,19 +47,17 @@ public:
uint32_t
magic; // HASH_MAGIC or HASH_CIGAM magic value to allow endian detection
uint16_t version; // Version number
uint16_t hash_function; // The hash function enumeration that was used
uint32_t bucket_count; // The number of buckets in this hash table
uint32_t hashes_count; // The total number of unique hash values and hash
// data offsets in this table
uint16_t version = 1; // Version number
uint16_t hash_function =
eHashFunctionDJB; // The hash function enumeration that was used
uint32_t bucket_count = 0; // The number of buckets in this hash table
uint32_t hashes_count = 0; // The total number of unique hash values and
// hash data offsets in this table
uint32_t header_data_len; // The size in bytes of the "header_data" template
// member below
HeaderData header_data; //
Header()
: magic(HASH_MAGIC), version(1), hash_function(eHashFunctionDJB),
bucket_count(0), hashes_count(0), header_data_len(sizeof(T)),
header_data() {}
Header() : magic(HASH_MAGIC), header_data_len(sizeof(T)), header_data() {}
virtual ~Header() = default;

View File

@ -885,10 +885,7 @@ public:
/// correctly.
class LookupInfo {
public:
LookupInfo()
: m_name(), m_lookup_name(), m_language(lldb::eLanguageTypeUnknown),
m_name_type_mask(lldb::eFunctionNameTypeNone),
m_match_name_after_lookup(false) {}
LookupInfo() : m_name(), m_lookup_name() {}
LookupInfo(ConstString name, lldb::FunctionNameType name_type_mask,
lldb::LanguageType language);
@ -917,15 +914,15 @@ public:
ConstString m_lookup_name;
/// Limit matches to only be for this language
lldb::LanguageType m_language;
lldb::LanguageType m_language = lldb::eLanguageTypeUnknown;
/// One or more bits from lldb::FunctionNameType that indicate what kind of
/// names we are looking for
lldb::FunctionNameType m_name_type_mask;
lldb::FunctionNameType m_name_type_mask = lldb::eFunctionNameTypeNone;
///< If \b true, then demangled names that match will need to contain
///< "m_name" in order to be considered a match
bool m_match_name_after_lookup;
bool m_match_name_after_lookup = false;
};
protected:
@ -952,7 +949,7 @@ protected:
ConstString m_object_name; ///< The name an object within this module that is
///selected, or empty of the module is represented
///by \a m_file.
uint64_t m_object_offset;
uint64_t m_object_offset = 0;
llvm::sys::TimePoint<> m_object_mod_time;
/// DataBuffer containing the module image, if it was provided at

View File

@ -471,7 +471,7 @@ protected:
collection m_modules; ///< The collection of modules.
mutable std::recursive_mutex m_modules_mutex;
Notifier *m_notifier;
Notifier *m_notifier = nullptr;
public:
typedef LockingAdaptedIterable<collection, lldb::ModuleSP, vector_adapter,

View File

@ -27,8 +27,7 @@ class ModuleSpec {
public:
ModuleSpec()
: m_file(), m_platform_file(), m_symbol_file(), m_arch(), m_uuid(),
m_object_name(), m_object_offset(0), m_object_size(0),
m_source_mappings() {}
m_object_name(), m_source_mappings() {}
/// If the \c data argument is passed, its contents will be used
/// as the module contents instead of trying to read them from
@ -271,8 +270,8 @@ protected:
ArchSpec m_arch;
UUID m_uuid;
ConstString m_object_name;
uint64_t m_object_offset;
uint64_t m_object_size;
uint64_t m_object_offset = 0;
uint64_t m_object_size = 0;
llvm::sys::TimePoint<> m_object_mod_time;
mutable PathMappingList m_source_mappings;
lldb::DataBufferSP m_data = {};

View File

@ -38,7 +38,7 @@ public:
eTypeBytes
};
Opcode() : m_byte_order(lldb::eByteOrderInvalid), m_type(eTypeInvalid) {}
Opcode() {}
Opcode(uint8_t inst, lldb::ByteOrder order)
: m_byte_order(order), m_type(eType8) {
@ -252,9 +252,9 @@ protected:
endian::InlHostByteOrder() == lldb::eByteOrderBig);
}
lldb::ByteOrder m_byte_order;
lldb::ByteOrder m_byte_order = lldb::eByteOrderInvalid;
Opcode::Type m_type;
Opcode::Type m_type = eTypeInvalid;
union {
uint8_t inst8;
uint16_t inst16;

View File

@ -24,7 +24,7 @@ namespace lldb_private {
/// providers. See Mangled::DemangleWithRichManglingInfo()
class RichManglingContext {
public:
RichManglingContext() : m_provider(None), m_ipd_buf_size(2048) {
RichManglingContext() {
m_ipd_buf = static_cast<char *>(std::malloc(m_ipd_buf_size));
m_ipd_buf[0] = '\0';
}
@ -70,7 +70,7 @@ private:
enum InfoProvider { None, ItaniumPartialDemangler, PluginCxxLanguage };
/// Selects the rich mangling info provider.
InfoProvider m_provider;
InfoProvider m_provider = None;
/// Reference to the buffer used for results of ParseXy() operations.
llvm::StringRef m_buffer;
@ -81,7 +81,7 @@ private:
/// ItaniumPartialDemangler. It should be managed with malloc/free, not
/// new/delete.
char *m_ipd_buf;
size_t m_ipd_buf_size;
size_t m_ipd_buf_size = 2048;
/// Members for PluginCxxLanguage
/// Cannot forward declare inner class CPlusPlusLanguage::MethodName. The

View File

@ -148,9 +148,9 @@ public:
protected:
Scalar m_value;
CompilerType m_compiler_type;
void *m_context;
ValueType m_value_type;
ContextType m_context_type;
void *m_context = nullptr;
ValueType m_value_type = ValueType::Scalar;
ContextType m_context_type = ContextType::Invalid;
DataBufferHeap m_data_buffer;
};

View File

@ -318,7 +318,7 @@ public:
ProcessModID m_mod_id; // This is the stop id when this ValueObject was last
// evaluated.
ExecutionContextRef m_exe_ctx_ref;
bool m_needs_update;
bool m_needs_update = true;
};
virtual ~ValueObject();
@ -795,7 +795,7 @@ protected:
class ChildrenManager {
public:
ChildrenManager() : m_mutex(), m_children(), m_children_count(0) {}
ChildrenManager() : m_mutex(), m_children() {}
bool HasChildAtIndex(size_t idx) {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@ -831,7 +831,7 @@ protected:
typedef ChildrenMap::value_type ChildrenPair;
std::recursive_mutex m_mutex;
ChildrenMap m_children;
size_t m_children_count;
size_t m_children_count = 0;
};
// Classes that inherit from ValueObject can see and modify these

View File

@ -35,12 +35,11 @@ public:
};
struct PointerAsArraySettings {
size_t m_element_count;
size_t m_base_element;
size_t m_stride;
size_t m_element_count = 0;
size_t m_base_element = 0;
size_t m_stride = 0;
PointerAsArraySettings()
: m_element_count(0), m_base_element(0), m_stride() {}
PointerAsArraySettings() {}
PointerAsArraySettings(size_t elem_count, size_t base_elem = 0,
size_t stride = 1)

View File

@ -105,7 +105,7 @@ private:
class TypeNameSpecifierImpl {
public:
TypeNameSpecifierImpl() : m_is_regex(false), m_type() {}
TypeNameSpecifierImpl() : m_type() {}
TypeNameSpecifierImpl(llvm::StringRef name, bool is_regex)
: m_is_regex(is_regex), m_type() {
@ -143,7 +143,7 @@ public:
bool IsRegex() { return m_is_regex; }
private:
bool m_is_regex;
bool m_is_regex = false;
// TODO: Replace this with TypeAndOrName.
struct TypeOrName {
std::string m_type_name;

View File

@ -25,7 +25,7 @@ class TypeFormatImpl {
public:
class Flags {
public:
Flags() : m_flags(lldb::eTypeOptionCascade) {}
Flags() {}
Flags(const Flags &other) : m_flags(other.m_flags) {}
@ -104,7 +104,7 @@ public:
void SetValue(uint32_t value) { m_flags = value; }
private:
uint32_t m_flags;
uint32_t m_flags = lldb::eTypeOptionCascade;
};
TypeFormatImpl(const Flags &flags = Flags());
@ -149,7 +149,7 @@ public:
protected:
Flags m_flags;
uint32_t m_my_revision;
uint32_t m_my_revision = 0;
private:
TypeFormatImpl(const TypeFormatImpl &) = delete;

View File

@ -38,8 +38,8 @@ public:
TypeSummaryOptions &SetCapping(lldb::TypeSummaryCapping);
private:
lldb::LanguageType m_lang;
lldb::TypeSummaryCapping m_capping;
lldb::LanguageType m_lang = lldb::eLanguageTypeUnknown;
lldb::TypeSummaryCapping m_capping = lldb::eTypeSummaryCapped;
};
class TypeSummaryImpl {
@ -52,7 +52,7 @@ public:
class Flags {
public:
Flags() : m_flags(lldb::eTypeOptionCascade) {}
Flags() {}
Flags(const Flags &other) : m_flags(other.m_flags) {}
@ -196,7 +196,7 @@ public:
void SetValue(uint32_t value) { m_flags = value; }
private:
uint32_t m_flags;
uint32_t m_flags = lldb::eTypeOptionCascade;
};
bool Cascades() const { return m_flags.GetCascades(); }

View File

@ -133,7 +133,7 @@ class SyntheticChildren {
public:
class Flags {
public:
Flags() : m_flags(lldb::eTypeOptionCascade) {}
Flags() {}
Flags(const Flags &other) : m_flags(other.m_flags) {}
@ -225,7 +225,7 @@ public:
void SetValue(uint32_t value) { m_flags = value; }
private:
uint32_t m_flags;
uint32_t m_flags = lldb::eTypeOptionCascade;
};
SyntheticChildren(const Flags &flags) : m_flags(flags) {}

View File

@ -250,10 +250,10 @@ private:
/// The DWARF compile unit this expression belongs to. It is used to evaluate
/// values indexing into the .debug_addr section (e.g. DW_OP_GNU_addr_index,
/// DW_OP_GNU_const_index)
const DWARFUnit *m_dwarf_cu;
const DWARFUnit *m_dwarf_cu = nullptr;
/// One of the defines that starts with LLDB_REGKIND_
lldb::RegisterKind m_reg_kind;
lldb::RegisterKind m_reg_kind = lldb::eRegisterKindDWARF;
struct LoclistAddresses {
lldb::addr_t cu_file_addr;

View File

@ -90,7 +90,7 @@ public:
class Entity {
public:
Entity() : m_alignment(1), m_size(0), m_offset(0) {}
Entity() {}
virtual ~Entity() = default;
@ -113,9 +113,9 @@ public:
void SetOffset(uint32_t offset) { m_offset = offset; }
protected:
uint32_t m_alignment;
uint32_t m_size;
uint32_t m_offset;
uint32_t m_alignment = 1;
uint32_t m_size = 0;
uint32_t m_offset = 0;
};
private:

View File

@ -65,10 +65,7 @@ public:
static llvm::Expected<const char *>
GetStreamOpenModeFromOptions(OpenOptions options);
File()
: IOObject(eFDTypeFile), m_is_interactive(eLazyBoolCalculate),
m_is_real_terminal(eLazyBoolCalculate),
m_supports_colors(eLazyBoolCalculate){};
File() : IOObject(eFDTypeFile){};
/// Read bytes from a file from the current file position into buf.
///
@ -360,9 +357,9 @@ public:
static bool classof(const File *file) { return file->isA(&ID); }
protected:
LazyBool m_is_interactive;
LazyBool m_is_real_terminal;
LazyBool m_supports_colors;
LazyBool m_is_interactive = eLazyBoolCalculate;
LazyBool m_is_real_terminal = eLazyBoolCalculate;
LazyBool m_supports_colors = eLazyBoolCalculate;
void CalculateInteractiveAndTerminal();
@ -373,9 +370,7 @@ private:
class NativeFile : public File {
public:
NativeFile()
: m_descriptor(kInvalidDescriptor), m_own_descriptor(false),
m_stream(kInvalidStream), m_options(), m_own_stream(false) {}
NativeFile() : m_descriptor(kInvalidDescriptor), m_stream(kInvalidStream) {}
NativeFile(FILE *fh, bool transfer_ownership)
: m_descriptor(kInvalidDescriptor), m_own_descriptor(false), m_stream(fh),
@ -422,10 +417,10 @@ protected:
// Member variables
int m_descriptor;
bool m_own_descriptor;
bool m_own_descriptor = false;
FILE *m_stream;
OpenOptions m_options;
bool m_own_stream;
OpenOptions m_options{};
bool m_own_stream = false;
std::mutex offset_access_mutex;
private:

View File

@ -46,9 +46,9 @@ public:
void Dump(Stream &stream) const;
protected:
Action m_action; // The action for this file
int m_fd; // An existing file descriptor
int m_arg; // oflag for eFileActionOpen*, dup_fd for eFileActionDuplicate
Action m_action = eFileActionNone; // The action for this file
int m_fd = -1; // An existing file descriptor
int m_arg = -1; // oflag for eFileActionOpen*, dup_fd for eFileActionDuplicate
FileSpec
m_file_spec; // A file spec to use for opening after fork or posix_spawn
};

View File

@ -33,7 +33,7 @@ public:
FileSystem()
: m_fs(llvm::vfs::getRealFileSystem()), m_collector(nullptr),
m_home_directory(), m_mapped(false) {}
m_home_directory() {}
FileSystem(std::shared_ptr<llvm::FileCollectorBase> collector)
: m_fs(llvm::vfs::getRealFileSystem()), m_collector(std::move(collector)),
m_home_directory(), m_mapped(false) {}
@ -201,7 +201,7 @@ private:
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> m_fs;
std::shared_ptr<llvm::FileCollectorBase> m_collector;
std::string m_home_directory;
bool m_mapped;
bool m_mapped = false;
};
} // namespace lldb_private

View File

@ -46,7 +46,7 @@ protected:
ThreadCreateTrampoline(lldb::thread_arg_t arg);
lldb::thread_t m_thread;
lldb::thread_result_t m_result;
lldb::thread_result_t m_result = 0;
};
}

View File

@ -176,10 +176,10 @@ protected:
Flags m_flags; // Bitwise OR of bits from lldb::LaunchFlags
std::vector<FileAction> m_file_actions; // File actions for any other files
std::shared_ptr<PseudoTerminal> m_pty;
uint32_t m_resume_count; // How many times do we resume after launching
uint32_t m_resume_count = 0; // How many times do we resume after launching
Host::MonitorChildProcessCallback m_monitor_callback;
void *m_monitor_callback_baton;
bool m_monitor_signals;
void *m_monitor_callback_baton = nullptr;
bool m_monitor_signals = false;
std::string m_event_data; // A string passed to the plugin launch, having no
// meaning to the upper levels of lldb.
lldb::ListenerSP m_listener_sp;

View File

@ -35,7 +35,7 @@ public:
class ProcessRunLocker {
public:
ProcessRunLocker() : m_lock(nullptr) {}
ProcessRunLocker() {}
~ProcessRunLocker() { Unlock(); }
@ -64,7 +64,7 @@ public:
}
}
ProcessRunLock *m_lock;
ProcessRunLock *m_lock = nullptr;
private:
ProcessRunLocker(const ProcessRunLocker &) = delete;
@ -73,7 +73,7 @@ public:
protected:
lldb::rwlock_t m_rwlock;
bool m_running;
bool m_running = false;
private:
ProcessRunLock(const ProcessRunLock &) = delete;

View File

@ -175,8 +175,8 @@ public:
protected:
// Member variables
int m_primary_fd; ///< The file descriptor for the primary.
int m_secondary_fd; ///< The file descriptor for the secondary.
int m_primary_fd = invalid_fd; ///< The file descriptor for the primary.
int m_secondary_fd = invalid_fd; ///< The file descriptor for the secondary.
private:
PseudoTerminal(const PseudoTerminal &) = delete;

View File

@ -116,12 +116,12 @@ protected:
// Member variables
Terminal m_tty; ///< A terminal
int m_tflags; ///< Cached tflags information.
int m_tflags = -1; ///< Cached tflags information.
#if LLDB_ENABLE_TERMIOS
std::unique_ptr<struct termios>
m_termios_up; ///< Cached terminal state information.
#endif
lldb::pid_t m_process_group; ///< Cached process group information.
lldb::pid_t m_process_group = -1; ///< Cached process group information.
};
/// \class TerminalStateSwitcher Terminal.h "lldb/Host/Terminal.h"
@ -171,7 +171,8 @@ public:
protected:
// Member variables
mutable uint32_t m_currentState; ///< The currently active TTY state index.
mutable uint32_t m_currentState =
UINT32_MAX; ///< The currently active TTY state index.
TerminalState
m_ttystates[2]; ///< The array of TTY states that holds saved TTY info.
};

View File

@ -107,7 +107,7 @@ public:
void ForEachAttribute(AttributeCallback const &callback) const;
protected:
XMLNodeImpl m_node;
XMLNodeImpl m_node = nullptr;
};
class XMLDocument {
@ -138,7 +138,7 @@ public:
static bool XMLEnabled();
protected:
XMLDocumentImpl m_document;
XMLDocumentImpl m_document = nullptr;
StreamString m_errors;
};

View File

@ -108,7 +108,7 @@ protected:
std::atomic<bool> m_shutting_down; // This marks that we are shutting down so
// if we get woken up from
// BytesAvailable to disconnect, we won't try to read again.
bool m_waiting_for_accept;
bool m_waiting_for_accept = false;
bool m_child_processes_inherit;
std::string m_uri;

View File

@ -30,7 +30,7 @@ public:
private:
std::recursive_mutex m_mutex;
std::unique_ptr<SystemInitializer> m_initializer;
bool m_initialized;
bool m_initialized = false;
// Noncopyable.
SystemLifetimeManager(const SystemLifetimeManager &other) = delete;

View File

@ -33,8 +33,7 @@ class CommandInterpreter;
class CommandInterpreterRunResult {
public:
CommandInterpreterRunResult()
: m_num_errors(0), m_result(lldb::eCommandInterpreterResultSuccess) {}
CommandInterpreterRunResult() {}
uint32_t GetNumErrors() const { return m_num_errors; }
@ -52,8 +51,9 @@ protected:
void SetResult(lldb::CommandInterpreterResult result) { m_result = result; }
private:
int m_num_errors;
lldb::CommandInterpreterResult m_result;
int m_num_errors = 0;
lldb::CommandInterpreterResult m_result =
lldb::eCommandInterpreterResultSuccess;
};
class CommandInterpreterRunOptions {
@ -101,13 +101,8 @@ public:
m_print_errors(print_errors), m_add_to_history(add_to_history) {}
CommandInterpreterRunOptions()
: m_stop_on_continue(eLazyBoolCalculate),
m_stop_on_error(eLazyBoolCalculate),
m_stop_on_crash(eLazyBoolCalculate),
m_echo_commands(eLazyBoolCalculate),
m_echo_comment_commands(eLazyBoolCalculate),
m_print_results(eLazyBoolCalculate), m_print_errors(eLazyBoolCalculate),
m_add_to_history(eLazyBoolCalculate) {}
{}
void SetSilent(bool silent) {
LazyBool value = silent ? eLazyBoolNo : eLazyBoolYes;
@ -187,14 +182,14 @@ public:
m_spawn_thread = spawn_thread ? eLazyBoolYes : eLazyBoolNo;
}
LazyBool m_stop_on_continue;
LazyBool m_stop_on_error;
LazyBool m_stop_on_crash;
LazyBool m_echo_commands;
LazyBool m_echo_comment_commands;
LazyBool m_print_results;
LazyBool m_print_errors;
LazyBool m_add_to_history;
LazyBool m_stop_on_continue = eLazyBoolCalculate;
LazyBool m_stop_on_error = eLazyBoolCalculate;
LazyBool m_stop_on_crash = eLazyBoolCalculate;
LazyBool m_echo_commands = eLazyBoolCalculate;
LazyBool m_echo_comment_commands = eLazyBoolCalculate;
LazyBool m_print_results = eLazyBoolCalculate;
LazyBool m_print_errors = eLazyBoolCalculate;
LazyBool m_add_to_history = eLazyBoolCalculate;
LazyBool m_auto_handle_events;
LazyBool m_spawn_thread;

View File

@ -60,7 +60,7 @@ public:
eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue)
};
OptionValue() : m_value_was_set(false) {}
OptionValue() {}
virtual ~OptionValue() = default;
@ -329,12 +329,12 @@ protected:
lldb::OptionValueWP m_parent_wp;
std::function<void()> m_callback;
bool m_value_was_set; // This can be used to see if a value has been set
// by a call to SetValueFromCString(). It is often
// handy to know if an option value was set from the
// command line or as a setting, versus if we just have
// the default value that was already populated in the
// option value.
bool m_value_was_set = false; // This can be used to see if a value has been
// set by a call to SetValueFromCString(). It is
// often handy to know if an option value was
// set from the command line or as a setting,
// versus if we just have the default value that
// was already populated in the option value.
};
} // namespace lldb_private

View File

@ -9,8 +9,8 @@
#ifndef LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H
#define LLDB_INTERPRETER_OPTIONVALUEFILECOLONLINE_H
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/OptionValue.h"
#include "lldb/Utility/FileSpec.h"
#include "llvm/Support/Chrono.h"
@ -50,9 +50,9 @@ public:
protected:
FileSpec m_file_spec;
uint32_t m_line_number;
uint32_t m_column_number;
uint32_t m_completion_mask;
uint32_t m_line_number = LLDB_INVALID_LINE_NUMBER;
uint32_t m_column_number = LLDB_INVALID_COLUMN_NUMBER;
uint32_t m_completion_mask = CommandCompletions::eSourceFileCompletion;
};
} // namespace lldb_private

View File

@ -9,6 +9,7 @@
#ifndef LLDB_INTERPRETER_OPTIONVALUEFILESPEC_H
#define LLDB_INTERPRETER_OPTIONVALUEFILESPEC_H
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/OptionValue.h"
#include "lldb/Utility/FileSpec.h"
@ -74,7 +75,7 @@ protected:
FileSpec m_default_value;
lldb::DataBufferSP m_data_sp;
llvm::sys::TimePoint<> m_data_mod_time;
uint32_t m_completion_mask;
uint32_t m_completion_mask = CommandCompletions::eDiskFileCompletion;
bool m_resolve;
};

View File

@ -254,7 +254,7 @@ public:
class OptionGroupOptions : public Options {
public:
OptionGroupOptions() : m_did_finalize(false) {}
OptionGroupOptions() {}
~OptionGroupOptions() override = default;
@ -317,7 +317,7 @@ public:
std::vector<OptionDefinition> m_option_defs;
OptionInfos m_option_infos;
bool m_did_finalize;
bool m_did_finalize = false;
};
} // namespace lldb_private

View File

@ -94,8 +94,7 @@ public:
struct ExecuteScriptOptions {
public:
ExecuteScriptOptions()
: m_enable_io(true), m_set_lldb_globals(true), m_maskout_errors(true) {}
ExecuteScriptOptions() {}
bool GetEnableIO() const { return m_enable_io; }
@ -122,9 +121,9 @@ public:
}
private:
bool m_enable_io;
bool m_set_lldb_globals;
bool m_maskout_errors;
bool m_enable_io = true;
bool m_set_lldb_globals = true;
bool m_maskout_errors = true;
};
virtual bool Interrupt() { return false; }

View File

@ -50,21 +50,20 @@ private:
// There are relatively few of these (one per 500/1000 functions, depending
// on format) so creating them on first scan will not be too costly.
struct UnwindIndex {
uint32_t function_offset; // The offset of the first function covered by
// this index
uint32_t second_level; // The offset (inside unwind_info sect) to the second
// level page for this index
uint32_t function_offset = 0; // The offset of the first function covered by
// this index
uint32_t second_level = 0; // The offset (inside unwind_info sect) to the
// second level page for this index
// (either UNWIND_SECOND_LEVEL_REGULAR or UNWIND_SECOND_LEVEL_COMPRESSED)
uint32_t lsda_array_start; // The offset (inside unwind_info sect) LSDA
// array for this index
uint32_t lsda_array_end; // The offset to the LSDA array for the NEXT index
bool sentinal_entry; // There is an empty index at the end which provides
// the upper bound of
uint32_t lsda_array_start = 0; // The offset (inside unwind_info sect) LSDA
// array for this index
uint32_t lsda_array_end =
0; // The offset to the LSDA array for the NEXT index
bool sentinal_entry = false; // There is an empty index at the end which
// provides the upper bound of
// function addresses that are described
UnwindIndex()
: function_offset(0), second_level(0), lsda_array_start(0),
lsda_array_end(0), sentinal_entry(false) {}
UnwindIndex() {}
bool operator<(const CompactUnwindInfo::UnwindIndex &rhs) const {
return function_offset < rhs.function_offset;
@ -78,30 +77,26 @@ private:
// An internal object used to store the information we retrieve about a
// function -- the encoding bits and possibly the LSDA/personality function.
struct FunctionInfo {
uint32_t encoding; // compact encoding 32-bit value for this function
uint32_t encoding = 0; // compact encoding 32-bit value for this function
Address lsda_address; // the address of the LSDA data for this function
Address personality_ptr_address; // the address where the personality
// routine addr can be found
uint32_t valid_range_offset_start; // first offset that this encoding is
// valid for (start of the function)
uint32_t
valid_range_offset_end; // the offset of the start of the next function
FunctionInfo()
: encoding(0), lsda_address(), personality_ptr_address(),
valid_range_offset_start(0), valid_range_offset_end(0) {}
uint32_t valid_range_offset_start = 0; // first offset that this encoding is
// valid for (start of the function)
uint32_t valid_range_offset_end =
0; // the offset of the start of the next function
FunctionInfo() : lsda_address(), personality_ptr_address() {}
};
struct UnwindHeader {
uint32_t version;
uint32_t common_encodings_array_offset;
uint32_t common_encodings_array_count;
uint32_t personality_array_offset;
uint32_t personality_array_count;
uint32_t common_encodings_array_offset = 0;
uint32_t common_encodings_array_count = 0;
uint32_t personality_array_offset = 0;
uint32_t personality_array_count = 0;
UnwindHeader()
: common_encodings_array_offset(0), common_encodings_array_count(0),
personality_array_offset(0), personality_array_count(0) {}
UnwindHeader() {}
};
void ScanIndex(const lldb::ProcessSP &process_sp);

View File

@ -140,10 +140,12 @@ struct LineEntry {
FileSpec file; ///< The source file, possibly mapped by the target.source-map
///setting
FileSpec original_file; ///< The original source file, from debug info.
uint32_t line; ///< The source line number, or zero if there is no line number
///information.
uint16_t column; ///< The column number of the source line, or zero if there
///is no column information.
uint32_t line = LLDB_INVALID_LINE_NUMBER; ///< The source line number, or zero
///< if there is no line number
/// information.
uint16_t column =
0; ///< The column number of the source line, or zero if there
/// is no column information.
uint16_t is_start_of_statement : 1, ///< Indicates this entry is the beginning
///of a statement.
is_start_of_basic_block : 1, ///< Indicates this entry is the beginning of

View File

@ -209,10 +209,9 @@ public:
protected:
struct Entry {
Entry()
: file_addr(LLDB_INVALID_ADDRESS), line(0),
is_start_of_statement(false), is_start_of_basic_block(false),
: line(0), is_start_of_statement(false), is_start_of_basic_block(false),
is_prologue_end(false), is_epilogue_begin(false),
is_terminal_entry(false), column(0), file_idx(0) {}
is_terminal_entry(false) {}
Entry(lldb::addr_t _file_addr, uint32_t _line, uint16_t _column,
uint16_t _file_idx, bool _is_start_of_statement,
@ -279,7 +278,7 @@ protected:
// Member variables.
/// The file address for this line entry.
lldb::addr_t file_addr;
lldb::addr_t file_addr = LLDB_INVALID_ADDRESS;
/// The source line number, or zero if there is no line number
/// information.
uint32_t line : 27;
@ -298,10 +297,10 @@ protected:
uint32_t is_terminal_entry : 1;
/// The column number of the source line, or zero if there is no
/// column information.
uint16_t column;
uint16_t column = 0;
/// The file index into CompileUnit's file table, or zero if there
/// is no file information.
uint16_t file_idx;
uint16_t file_idx = 0;
};
struct EntrySearchInfo {

View File

@ -233,8 +233,9 @@ protected:
lldb_private::ModuleSpec &module_spec,
lldb_private::ModuleList &seen_modules) const;
uint32_t m_uid; // User ID (usually the original symbol table index)
uint16_t m_type_data; // data specific to m_type
uint32_t m_uid =
UINT32_MAX; // User ID (usually the original symbol table index)
uint16_t m_type_data = 0; // data specific to m_type
uint16_t m_type_data_resolved : 1, // True if the data in m_type_data has
// already been calculated
m_is_synthetic : 1, // non-zero if this symbol is not actually in the
@ -261,8 +262,8 @@ protected:
AddressRange m_addr_range; // Contains the value, or the section offset
// address when the value is an address in a
// section, and the size (if any)
uint32_t m_flags; // A copy of the flags from the original symbol table, the
// ObjectFile plug-in can interpret these
uint32_t m_flags = 0; // A copy of the flags from the original symbol table,
// the ObjectFile plug-in can interpret these
};
} // namespace lldb_private

View File

@ -316,12 +316,13 @@ public:
// Member variables
lldb::TargetSP target_sp; ///< The Target for a given query
lldb::ModuleSP module_sp; ///< The Module for a given query
CompileUnit *comp_unit; ///< The CompileUnit for a given query
Function *function; ///< The Function for a given query
Block *block; ///< The Block for a given query
CompileUnit *comp_unit = nullptr; ///< The CompileUnit for a given query
Function *function = nullptr; ///< The Function for a given query
Block *block = nullptr; ///< The Block for a given query
LineEntry line_entry; ///< The LineEntry for a given query
Symbol *symbol; ///< The Symbol for a given query
Variable *variable; ///< The global variable matching the given query
Symbol *symbol = nullptr; ///< The Symbol for a given query
Variable *variable =
nullptr; ///< The global variable matching the given query
};
class SymbolContextSpecifier {

View File

@ -213,17 +213,17 @@ public:
protected:
ConstString m_name;
SymbolFile *m_symbol_file;
SymbolFile *m_symbol_file = nullptr;
/// The symbol context in which this type is defined.
SymbolContextScope *m_context;
Type *m_encoding_type;
lldb::user_id_t m_encoding_uid;
EncodingDataType m_encoding_uid_type;
SymbolContextScope *m_context = nullptr;
Type *m_encoding_type = nullptr;
lldb::user_id_t m_encoding_uid = LLDB_INVALID_UID;
EncodingDataType m_encoding_uid_type = eEncodingInvalid;
uint64_t m_byte_size : 63;
uint64_t m_byte_size_has_value : 1;
Declaration m_decl;
CompilerType m_compiler_type;
ResolveState m_compiler_type_resolve_state;
ResolveState m_compiler_type_resolve_state = ResolveState::Unresolved;
/// Language-specific flags.
Payload m_payload;
@ -340,8 +340,7 @@ private:
class TypeMemberImpl {
public:
TypeMemberImpl()
: m_type_impl_sp(), m_bit_offset(0), m_name(), m_bitfield_bit_size(0),
m_is_bitfield(false)
: m_type_impl_sp(), m_name()
{}
@ -376,10 +375,10 @@ public:
protected:
lldb::TypeImplSP m_type_impl_sp;
uint64_t m_bit_offset;
uint64_t m_bit_offset = 0;
ConstString m_name;
uint32_t m_bitfield_bit_size; // Bit size for bitfield members only
bool m_is_bitfield;
uint32_t m_bitfield_bit_size = 0; // Bit size for bitfield members only
bool m_is_bitfield = false;
};
///
@ -435,9 +434,7 @@ private:
class TypeMemberFunctionImpl {
public:
TypeMemberFunctionImpl()
: m_type(), m_decl(), m_name(), m_kind(lldb::eMemberFunctionKindUnknown) {
}
TypeMemberFunctionImpl() : m_type(), m_decl(), m_name() {}
TypeMemberFunctionImpl(const CompilerType &type, const CompilerDecl &decl,
const std::string &name,
@ -469,13 +466,12 @@ private:
CompilerType m_type;
CompilerDecl m_decl;
ConstString m_name;
lldb::MemberFunctionKind m_kind;
lldb::MemberFunctionKind m_kind = lldb::eMemberFunctionKindUnknown;
};
class TypeEnumMemberImpl {
public:
TypeEnumMemberImpl()
: m_integer_type_sp(), m_name("<invalid>"), m_value(), m_valid(false) {}
TypeEnumMemberImpl() : m_integer_type_sp(), m_name("<invalid>"), m_value() {}
TypeEnumMemberImpl(const lldb::TypeImplSP &integer_type_sp,
ConstString name, const llvm::APSInt &value);
@ -498,7 +494,7 @@ protected:
lldb::TypeImplSP m_integer_type_sp;
ConstString m_name;
llvm::APSInt m_value;
bool m_valid;
bool m_valid = false;
};
class TypeEnumMemberListImpl {

View File

@ -524,7 +524,7 @@ protected:
mutable std::mutex m_mutex; ///< A mutex to keep this object happy in
///multi-threaded environments.
collection m_map;
bool m_clear_in_progress;
bool m_clear_in_progress = false;
private:
typedef llvm::function_ref<lldb::TypeSystemSP()> CreateCallback;

View File

@ -71,7 +71,7 @@ public:
isDWARFExpression // reg = eval(dwarf_expr)
};
RegisterLocation() : m_type(unspecified), m_location() {}
RegisterLocation() : m_location() {}
bool operator==(const RegisterLocation &rhs) const;
@ -181,7 +181,7 @@ public:
const UnwindPlan::Row *row, Thread *thread, bool verbose) const;
private:
RestoreType m_type; // How do we locate this register?
RestoreType m_type = unspecified; // How do we locate this register?
union {
// For m_type == atCFAPlusOffset or m_type == isCFAPlusOffset
int32_t offset;
@ -205,7 +205,7 @@ public:
isRaSearch, // FA = SP + offset + ???
};
FAValue() : m_type(unspecified), m_value() {}
FAValue() : m_value() {}
bool operator==(const FAValue &rhs) const;
@ -301,7 +301,7 @@ public:
void Dump(Stream &s, const UnwindPlan *unwind_plan, Thread *thread) const;
private:
ValueType m_type; // How do we compute CFA value?
ValueType m_type = unspecified; // How do we compute CFA value?
union {
struct {
// For m_type == isRegisterPlusOffset or m_type ==
@ -384,12 +384,12 @@ public:
protected:
typedef std::map<uint32_t, RegisterLocation> collection;
lldb::addr_t m_offset; // Offset into the function for this row
lldb::addr_t m_offset = 0; // Offset into the function for this row
FAValue m_cfa_value;
FAValue m_afa_value;
collection m_register_locations;
bool m_unspecified_registers_are_undefined;
bool m_unspecified_registers_are_undefined = false;
}; // class Row
typedef std::shared_ptr<Row> RowSP;

View File

@ -263,8 +263,9 @@ protected:
lldb::TargetWP m_target_wp; ///< A weak reference to a target
lldb::ProcessWP m_process_wp; ///< A weak reference to a process
mutable lldb::ThreadWP m_thread_wp; ///< A weak reference to a thread
lldb::tid_t m_tid; ///< The thread ID that this object refers to in case the
///backing object changes
lldb::tid_t m_tid = LLDB_INVALID_THREAD_ID; ///< The thread ID that this
///< object refers to in case the
/// backing object changes
StackID m_stack_id; ///< The stack ID that this object refers to in case the
///backing object changes
};

View File

@ -118,9 +118,9 @@ protected:
const_iterator FindIteratorForPath(ConstString path) const;
collection m_pairs;
ChangedCallback m_callback;
void *m_callback_baton;
uint32_t m_mod_id; // Incremented anytime anything is added or removed.
ChangedCallback m_callback = nullptr;
void *m_callback_baton = nullptr;
uint32_t m_mod_id = 0; // Incremented anytime anything is added or removed.
};
} // namespace lldb_private

View File

@ -113,9 +113,7 @@ class ProcessAttachInfo : public ProcessInstanceInfo {
public:
ProcessAttachInfo()
: ProcessInstanceInfo(), m_listener_sp(), m_hijack_listener_sp(),
m_plugin_name(), m_resume_count(0), m_wait_for_launch(false),
m_ignore_existing(true), m_continue_once_attached(false),
m_detach_on_error(true), m_async(false) {}
m_plugin_name() {}
ProcessAttachInfo(const ProcessLaunchInfo &launch_info)
: ProcessInstanceInfo(), m_listener_sp(), m_hijack_listener_sp(),
@ -200,17 +198,19 @@ protected:
lldb::ListenerSP m_listener_sp;
lldb::ListenerSP m_hijack_listener_sp;
std::string m_plugin_name;
uint32_t m_resume_count; // How many times do we resume after launching
bool m_wait_for_launch;
bool m_ignore_existing;
bool m_continue_once_attached; // Supports the use-case scenario of
// immediately continuing the process once
// attached.
bool m_detach_on_error; // If we are debugging remotely, instruct the stub to
// detach rather than killing the target on error.
bool m_async; // Use an async attach where we start the attach and return
// immediately (used by GUI programs with --waitfor so they can
// call SBProcess::Stop() to cancel attach)
uint32_t m_resume_count = 0; // How many times do we resume after launching
bool m_wait_for_launch = false;
bool m_ignore_existing = true;
bool m_continue_once_attached = false; // Supports the use-case scenario of
// immediately continuing the process
// once attached.
bool m_detach_on_error =
true; // If we are debugging remotely, instruct the stub to
// detach rather than killing the target on error.
bool m_async =
false; // Use an async attach where we start the attach and return
// immediately (used by GUI programs with --waitfor so they can
// call SBProcess::Stop() to cancel attach)
};
// This class tracks the Modification state of the process. Things that can
@ -223,9 +223,8 @@ class ProcessModID {
public:
ProcessModID()
: m_stop_id(0), m_last_natural_stop_id(0), m_resume_id(0), m_memory_id(0),
m_last_user_expression_resume(0), m_running_user_expression(false),
m_running_utility_function(0) {}
{}
ProcessModID(const ProcessModID &rhs)
: m_stop_id(rhs.m_stop_id), m_memory_id(rhs.m_memory_id) {}
@ -316,13 +315,13 @@ public:
}
private:
uint32_t m_stop_id;
uint32_t m_last_natural_stop_id;
uint32_t m_resume_id;
uint32_t m_memory_id;
uint32_t m_last_user_expression_resume;
uint32_t m_running_user_expression;
uint32_t m_running_utility_function;
uint32_t m_stop_id = 0;
uint32_t m_last_natural_stop_id = 0;
uint32_t m_resume_id = 0;
uint32_t m_memory_id = 0;
uint32_t m_last_user_expression_resume = 0;
uint32_t m_running_user_expression = false;
uint32_t m_running_utility_function = 0;
lldb::EventSP m_last_natural_stop_event;
};
@ -471,12 +470,12 @@ public:
}
lldb::ProcessWP m_process_wp;
lldb::StateType m_state;
lldb::StateType m_state = lldb::eStateInvalid;
std::vector<std::string> m_restarted_reasons;
bool m_restarted; // For "eStateStopped" events, this is true if the target
// was automatically restarted.
int m_update_state;
bool m_interrupted;
bool m_restarted = false; // For "eStateStopped" events, this is true if the
// target was automatically restarted.
int m_update_state = 0;
bool m_interrupted = false;
ProcessEventData(const ProcessEventData &) = delete;
const ProcessEventData &operator=(const ProcessEventData &) = delete;

View File

@ -50,10 +50,10 @@ private:
typedef std::map<lldb::RegisterKind, uint32_t> Collection;
lldb::RegisterContextSP m_reg_ctx_sp;
uint32_t m_regnum;
lldb::RegisterKind m_kind;
uint32_t m_regnum = LLDB_INVALID_REGNUM;
lldb::RegisterKind m_kind = lldb::kNumRegisterKinds;
Collection m_kind_regnum_map;
const char *m_name;
const char *m_name = nullptr;
};
#endif // LLDB_TARGET_REGISTERNUMBER_H

View File

@ -18,8 +18,8 @@ class StackID {
public:
// Constructors and Destructors
StackID()
: m_pc(LLDB_INVALID_ADDRESS), m_cfa(LLDB_INVALID_ADDRESS),
m_symbol_scope(nullptr) {}
{}
explicit StackID(lldb::addr_t pc, lldb::addr_t cfa,
SymbolContextScope *symbol_scope)
@ -69,23 +69,25 @@ protected:
void SetCFA(lldb::addr_t cfa) { m_cfa = cfa; }
lldb::addr_t
m_pc; // The pc value for the function/symbol for this frame. This will
lldb::addr_t m_pc =
LLDB_INVALID_ADDRESS; // The pc value for the function/symbol for this
// frame. This will
// only get used if the symbol scope is nullptr (the code where we are
// stopped is not represented by any function or symbol in any shared
// library).
lldb::addr_t m_cfa; // The call frame address (stack pointer) value
// at the beginning of the function that uniquely
// identifies this frame (along with m_symbol_scope
// below)
SymbolContextScope *
m_symbol_scope; // If nullptr, there is no block or symbol for this frame.
// If not nullptr, this will either be the scope for the
// lexical block for the frame, or the scope for the
// symbol. Symbol context scopes are always be unique
// pointers since the are part of the Block and Symbol
// objects and can easily be used to tell if a stack ID
// is the same as another.
lldb::addr_t m_cfa =
LLDB_INVALID_ADDRESS; // The call frame address (stack pointer) value
// at the beginning of the function that uniquely
// identifies this frame (along with m_symbol_scope
// below)
SymbolContextScope *m_symbol_scope =
nullptr; // If nullptr, there is no block or symbol for this frame.
// If not nullptr, this will either be the scope for the
// lexical block for the frame, or the scope for the
// symbol. Symbol context scopes are always be unique
// pointers since the are part of the Block and Symbol
// objects and can easily be used to tell if a stack ID
// is the same as another.
};
bool operator==(const StackID &lhs, const StackID &rhs);

View File

@ -120,8 +120,8 @@ private:
return g_option_names[(size_t) enum_value];
}
uint32_t m_index;
lldb::tid_t m_tid;
uint32_t m_index = UINT32_MAX;
lldb::tid_t m_tid = LLDB_INVALID_THREAD_ID;
std::string m_name;
std::string m_queue_name;
};

View File

@ -109,17 +109,17 @@ protected:
private:
struct Cursor {
lldb::addr_t start_pc; // The start address of the function/symbol for this
// frame - current pc if unknown
lldb::addr_t cfa; // The canonical frame address for this stack frame
lldb::addr_t start_pc =
LLDB_INVALID_ADDRESS; // The start address of the function/symbol for
// this frame - current pc if unknown
lldb::addr_t cfa = LLDB_INVALID_ADDRESS; // The canonical frame address for
// this stack frame
lldb_private::SymbolContext sctx; // A symbol context we'll contribute to &
// provide to the StackFrame creation
RegisterContextLLDBSP
reg_ctx_lldb_sp; // These are all RegisterContextUnwind's
Cursor()
: start_pc(LLDB_INVALID_ADDRESS), cfa(LLDB_INVALID_ADDRESS), sctx(),
reg_ctx_lldb_sp() {}
Cursor() : sctx(), reg_ctx_lldb_sp() {}
private:
Cursor(const Cursor &) = delete;

View File

@ -226,10 +226,10 @@ private:
size_t GetByteSize() const { return m_end - m_start; }
/// A pointer to the first byte of data.
uint8_t *m_start;
uint8_t *m_start = nullptr;
/// A pointer to the byte that is past the end of the data.
uint8_t *m_end;
uint8_t *m_end = nullptr;
/// The byte order of the data we are extracting from.
lldb::ByteOrder m_byte_order;

View File

@ -997,15 +997,15 @@ protected:
}
// Member variables
const uint8_t *m_start; ///< A pointer to the first byte of data.
const uint8_t
*m_end; ///< A pointer to the byte that is past the end of the data.
const uint8_t *m_start = nullptr; ///< A pointer to the first byte of data.
const uint8_t *m_end =
nullptr; ///< A pointer to the byte that is past the end of the data.
lldb::ByteOrder
m_byte_order; ///< The byte order of the data we are extracting from.
uint32_t m_addr_size; ///< The address size to use when extracting addresses.
/// The shared pointer to data that can be shared among multiple instances
lldb::DataBufferSP m_data_sp;
const uint32_t m_target_byte_size;
const uint32_t m_target_byte_size = 1;
};
} // namespace lldb_private

View File

@ -55,9 +55,7 @@ struct GDBRemotePacket {
enum Type { ePacketTypeInvalid = 0, ePacketTypeSend, ePacketTypeRecv };
GDBRemotePacket()
: packet(), type(ePacketTypeInvalid), bytes_transmitted(0), packet_idx(0),
tid(LLDB_INVALID_THREAD_ID) {}
GDBRemotePacket() : packet() {}
void Clear() {
packet.data.clear();
@ -74,10 +72,10 @@ struct GDBRemotePacket {
void Dump(Stream &strm) const;
BinaryData packet;
Type type;
uint32_t bytes_transmitted;
uint32_t packet_idx;
lldb::tid_t tid;
Type type = ePacketTypeInvalid;
uint32_t bytes_transmitted = 0;
uint32_t packet_idx = 0;
lldb::tid_t tid = LLDB_INVALID_THREAD_ID;
private:
llvm::StringRef GetTypeStr() const;

View File

@ -95,10 +95,10 @@ protected:
// the resolved platform executable (which is in m_executable)
Args m_arguments; // All program arguments except argv[0]
Environment m_environment;
uint32_t m_uid;
uint32_t m_gid;
uint32_t m_uid = UINT32_MAX;
uint32_t m_gid = UINT32_MAX;
ArchSpec m_arch;
lldb::pid_t m_pid;
lldb::pid_t m_pid = LLDB_INVALID_PROCESS_ID;
};
// ProcessInstanceInfo
@ -107,9 +107,7 @@ protected:
// to that process.
class ProcessInstanceInfo : public ProcessInfo {
public:
ProcessInstanceInfo()
: ProcessInfo(), m_euid(UINT32_MAX), m_egid(UINT32_MAX),
m_parent_pid(LLDB_INVALID_PROCESS_ID) {}
ProcessInstanceInfo() : ProcessInfo() {}
ProcessInstanceInfo(const char *name, const ArchSpec &arch, lldb::pid_t pid)
: ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX),
@ -151,9 +149,9 @@ public:
protected:
friend struct llvm::yaml::MappingTraits<ProcessInstanceInfo>;
uint32_t m_euid;
uint32_t m_egid;
lldb::pid_t m_parent_pid;
uint32_t m_euid = UINT32_MAX;
uint32_t m_egid = UINT32_MAX;
lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID;
};
typedef std::vector<ProcessInstanceInfo> ProcessInstanceInfoList;
@ -164,9 +162,7 @@ typedef std::vector<ProcessInstanceInfo> ProcessInstanceInfoList;
class ProcessInstanceInfoMatch {
public:
ProcessInstanceInfoMatch()
: m_match_info(), m_name_match_type(NameMatch::Ignore),
m_match_all_users(false) {}
ProcessInstanceInfoMatch() : m_match_info() {}
ProcessInstanceInfoMatch(const char *process_name,
NameMatch process_name_match_type)
@ -211,8 +207,8 @@ public:
protected:
ProcessInstanceInfo m_match_info;
NameMatch m_name_match_type;
bool m_match_all_users;
NameMatch m_name_match_type = NameMatch::Ignore;
bool m_match_all_users = false;
};
namespace repro {

View File

@ -43,8 +43,7 @@ public:
eTypeBytes
};
RegisterValue()
: m_type(eTypeInvalid), m_scalar(static_cast<unsigned long>(0)) {}
RegisterValue() : m_scalar(static_cast<unsigned long>(0)) {}
explicit RegisterValue(uint8_t inst) : m_type(eTypeUInt8) { m_scalar = inst; }
@ -257,7 +256,7 @@ public:
void Clear();
protected:
RegisterValue::Type m_type;
RegisterValue::Type m_type = eTypeInvalid;
Scalar m_scalar;
struct {

View File

@ -714,8 +714,7 @@ protected:
friend llvm::optional_detail::OptionalStorage<InstrumentationData, true>;
friend llvm::Optional<InstrumentationData>;
InstrumentationData()
: m_serializer(nullptr), m_deserializer(nullptr), m_registry(nullptr) {}
InstrumentationData() {}
InstrumentationData(Serializer &serializer, Registry &registry)
: m_serializer(&serializer), m_deserializer(nullptr),
m_registry(&registry) {}
@ -726,9 +725,9 @@ protected:
private:
static llvm::Optional<InstrumentationData> &InstanceImpl();
Serializer *m_serializer;
Deserializer *m_deserializer;
Registry *m_registry;
Serializer *m_serializer = nullptr;
Deserializer *m_deserializer = nullptr;
Registry *m_registry = nullptr;
};
struct EmptyArg {};
@ -888,17 +887,17 @@ private:
}
#endif
Serializer *m_serializer;
Serializer *m_serializer = nullptr;
/// Pretty function for logging.
llvm::StringRef m_pretty_func;
std::string m_pretty_args;
/// Whether this function call was the one crossing the API boundary.
bool m_local_boundary;
bool m_local_boundary = false;
/// Whether the return value was recorded explicitly.
bool m_result_recorded;
bool m_result_recorded = true;
/// The sequence number for this pair of function and result.
unsigned m_sequence;

View File

@ -49,7 +49,7 @@ public:
};
// Constructors and Destructors
Scalar() : m_type(e_void), m_float(0.0f) {}
Scalar() : m_float(0.0f) {}
Scalar(int v) : m_type(e_int), m_integer(MakeAPSInt(v)), m_float(0.0f) {}
Scalar(unsigned int v)
: m_type(e_int), m_integer(MakeAPSInt(v)), m_float(0.0f) {}
@ -187,7 +187,7 @@ public:
size_t byte_size);
protected:
Scalar::Type m_type;
Scalar::Type m_type = e_void;
llvm::APSInt m_integer;
llvm::APFloat m_float;

View File

@ -196,8 +196,9 @@ public:
protected:
/// Member variables
ValueType m_code; ///< Status code as an integer value.
lldb::ErrorType m_type; ///< The type of the above error code.
ValueType m_code = 0; ///< Status code as an integer value.
lldb::ErrorType m_type =
lldb::eErrorTypeInvalid; ///< The type of the above error code.
mutable std::string m_string; ///< A string representation of the error code.
};

View File

@ -361,10 +361,10 @@ public:
protected:
// Member variables
Flags m_flags; ///< Dump flags.
uint32_t m_addr_size; ///< Size of an address in bytes.
uint32_t m_addr_size = 4; ///< Size of an address in bytes.
lldb::ByteOrder
m_byte_order; ///< Byte order to use when encoding scalar types.
unsigned m_indent_level; ///< Indention level.
unsigned m_indent_level = 0; ///< Indention level.
std::size_t m_bytes_written = 0; ///< Number of bytes written so far.
void _PutHex8(uint8_t uvalue, bool add_prefix);

View File

@ -115,7 +115,7 @@ protected:
/// When extracting data from a packet, this index will march along as things
/// get extracted. If set to UINT64_MAX the end of the packet data was
/// reached when decoding information.
uint64_t m_index;
uint64_t m_index = 0;
};
#endif // LLDB_UTILITY_STRINGEXTRACTOR_H

View File

@ -23,7 +23,7 @@ public:
typedef bool (*ResponseValidatorCallback)(
void *baton, const StringExtractorGDBRemote &response);
StringExtractorGDBRemote() : StringExtractor(), m_validator(nullptr) {}
StringExtractorGDBRemote() : StringExtractor() {}
StringExtractorGDBRemote(llvm::StringRef str)
: StringExtractor(str), m_validator(nullptr) {}
@ -201,7 +201,7 @@ public:
GetPidTid(lldb::pid_t default_pid);
protected:
ResponseValidatorCallback m_validator;
ResponseValidatorCallback m_validator = nullptr;
void *m_validator_baton;
};

View File

@ -26,7 +26,7 @@ public:
typedef collection::iterator iterator;
typedef collection::const_iterator const_iterator;
VMRange() : m_base_addr(0), m_byte_size(0) {}
VMRange() {}
VMRange(lldb::addr_t start_addr, lldb::addr_t end_addr)
: m_base_addr(start_addr),
@ -88,8 +88,8 @@ public:
const VMRange &range);
protected:
lldb::addr_t m_base_addr;
lldb::addr_t m_byte_size;
lldb::addr_t m_base_addr = 0;
lldb::addr_t m_byte_size = 0;
};
bool operator==(const VMRange &lhs, const VMRange &rhs);

View File

@ -25,9 +25,7 @@
using namespace lldb;
using namespace lldb_private;
SBBlock::SBBlock() : m_opaque_ptr(nullptr) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBlock);
}
SBBlock::SBBlock() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBlock); }
SBBlock::SBBlock(lldb_private::Block *lldb_object_ptr)
: m_opaque_ptr(lldb_object_ptr) {}

View File

@ -16,7 +16,7 @@
using namespace lldb;
using namespace lldb_private;
SBBroadcaster::SBBroadcaster() : m_opaque_sp(), m_opaque_ptr(nullptr) {
SBBroadcaster::SBBroadcaster() : m_opaque_sp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBBroadcaster);
}

View File

@ -21,8 +21,7 @@ using namespace lldb_private;
class lldb_private::SBCommandReturnObjectImpl {
public:
SBCommandReturnObjectImpl()
: m_ptr(new CommandReturnObject(false)), m_owned(true) {}
SBCommandReturnObjectImpl() : m_ptr(new CommandReturnObject(false)) {}
SBCommandReturnObjectImpl(CommandReturnObject &ref)
: m_ptr(&ref), m_owned(false) {}
SBCommandReturnObjectImpl(const SBCommandReturnObjectImpl &rhs)
@ -42,7 +41,7 @@ public:
private:
CommandReturnObject *m_ptr;
bool m_owned;
bool m_owned = true;
};
SBCommandReturnObject::SBCommandReturnObject()

View File

@ -16,7 +16,7 @@
using namespace lldb;
using namespace lldb_private;
SBCommunication::SBCommunication() : m_opaque(nullptr), m_opaque_owned(false) {
SBCommunication::SBCommunication() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommunication);
}

View File

@ -21,7 +21,7 @@
using namespace lldb;
using namespace lldb_private;
SBCompileUnit::SBCompileUnit() : m_opaque_ptr(nullptr) {
SBCompileUnit::SBCompileUnit() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBCompileUnit);
}

View File

@ -22,9 +22,7 @@
using namespace lldb;
using namespace lldb_private;
SBEvent::SBEvent() : m_event_sp(), m_opaque_ptr(nullptr) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBEvent);
}
SBEvent::SBEvent() : m_event_sp() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBEvent); }
SBEvent::SBEvent(uint32_t event_type, const char *cstr, uint32_t cstr_len)
: m_event_sp(new Event(event_type, new EventDataBytes(cstr, cstr_len))),

View File

@ -22,9 +22,7 @@
using namespace lldb;
using namespace lldb_private;
SBFunction::SBFunction() : m_opaque_ptr(nullptr) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFunction);
}
SBFunction::SBFunction() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFunction); }
SBFunction::SBFunction(lldb_private::Function *lldb_object_ptr)
: m_opaque_ptr(lldb_object_ptr) {}

View File

@ -20,7 +20,7 @@
using namespace lldb;
using namespace lldb_private;
SBListener::SBListener() : m_opaque_sp(), m_unused_ptr(nullptr) {
SBListener::SBListener() : m_opaque_sp() {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBListener);
}

View File

@ -32,7 +32,7 @@ using namespace lldb_private;
struct PlatformConnectOptions {
PlatformConnectOptions(const char *url = nullptr)
: m_url(), m_rsync_options(), m_rsync_remote_path_prefix(),
m_rsync_enabled(false), m_rsync_omit_hostname_from_remote_path(false),
m_local_cache_directory() {
if (url && url[0])
m_url = url;
@ -43,8 +43,8 @@ struct PlatformConnectOptions {
std::string m_url;
std::string m_rsync_options;
std::string m_rsync_remote_path_prefix;
bool m_rsync_enabled;
bool m_rsync_omit_hostname_from_remote_path;
bool m_rsync_enabled = false;
bool m_rsync_omit_hostname_from_remote_path = false;
ConstString m_local_cache_directory;
};
@ -61,7 +61,7 @@ struct PlatformShellCommand {
}
PlatformShellCommand(llvm::StringRef shell_command = llvm::StringRef())
: m_shell(), m_command(), m_working_dir(), m_status(0), m_signo(0) {
: m_shell(), m_command(), m_working_dir() {
if (!shell_command.empty())
m_command = shell_command.str();
}
@ -72,8 +72,8 @@ struct PlatformShellCommand {
std::string m_command;
std::string m_working_dir;
std::string m_output;
int m_status;
int m_signo;
int m_status = 0;
int m_signo = 0;
Timeout<std::ratio<1>> m_timeout = llvm::None;
};
// SBPlatformConnectOptions

View File

@ -27,9 +27,7 @@ namespace lldb_private {
class QueueImpl {
public:
QueueImpl()
: m_queue_wp(), m_threads(), m_thread_list_fetched(false),
m_pending_items(), m_pending_items_fetched(false) {}
QueueImpl() : m_queue_wp(), m_threads(), m_pending_items() {}
QueueImpl(const lldb::QueueSP &queue_sp)
: m_queue_wp(), m_threads(), m_thread_list_fetched(false),
@ -210,10 +208,11 @@ private:
lldb::QueueWP m_queue_wp;
std::vector<lldb::ThreadWP>
m_threads; // threads currently executing this queue's items
bool
m_thread_list_fetched; // have we tried to fetch the threads list already?
bool m_thread_list_fetched =
false; // have we tried to fetch the threads list already?
std::vector<lldb::QueueItemSP> m_pending_items; // items currently enqueued
bool m_pending_items_fetched; // have we tried to fetch the item list already?
bool m_pending_items_fetched =
false; // have we tried to fetch the item list already?
};
}

View File

@ -19,7 +19,7 @@
using namespace lldb;
using namespace lldb_private;
SBStream::SBStream() : m_opaque_up(new StreamString()), m_is_file(false) {
SBStream::SBStream() : m_opaque_up(new StreamString()) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBStream);
}

View File

@ -18,9 +18,7 @@
using namespace lldb;
using namespace lldb_private;
SBSymbol::SBSymbol() : m_opaque_ptr(nullptr) {
LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBSymbol);
}
SBSymbol::SBSymbol() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBSymbol); }
SBSymbol::SBSymbol(lldb_private::Symbol *lldb_object_ptr)
: m_opaque_ptr(lldb_object_ptr) {}

View File

@ -21,9 +21,7 @@ public:
VariablesOptionsImpl()
: m_include_arguments(false), m_include_locals(false),
m_include_statics(false), m_in_scope_only(false),
m_include_runtime_support_values(false),
m_include_recognized_arguments(eLazyBoolCalculate),
m_use_dynamic(lldb::eNoDynamicValues) {}
m_include_runtime_support_values(false) {}
VariablesOptionsImpl(const VariablesOptionsImpl &) = default;
@ -75,8 +73,9 @@ private:
bool m_include_statics : 1;
bool m_in_scope_only : 1;
bool m_include_runtime_support_values : 1;
LazyBool m_include_recognized_arguments; // can be overridden with a setting
lldb::DynamicValueType m_use_dynamic;
LazyBool m_include_recognized_arguments =
eLazyBoolCalculate; // can be overridden with a setting
lldb::DynamicValueType m_use_dynamic = lldb::eNoDynamicValues;
};
SBVariablesOptions::SBVariablesOptions()

View File

@ -14,7 +14,7 @@ using namespace lldb;
using namespace lldb_private;
// Stoppoint constructor
Stoppoint::Stoppoint() : m_bid(LLDB_INVALID_BREAK_ID) {}
Stoppoint::Stoppoint() {}
// Destructor
Stoppoint::~Stoppoint() {}

View File

@ -10,8 +10,7 @@
using namespace lldb_private;
StoppointCallbackContext::StoppointCallbackContext()
: event(nullptr), exe_ctx_ref(), is_synchronous(false) {}
StoppointCallbackContext::StoppointCallbackContext() : exe_ctx_ref() {}
StoppointCallbackContext::StoppointCallbackContext(
Event *e, const ExecutionContext &exe_ctx, bool synchronously)

View File

@ -12,8 +12,7 @@
using namespace lldb;
using namespace lldb_private;
WatchpointList::WatchpointList()
: m_watchpoints(), m_mutex(), m_next_wp_id(0) {}
WatchpointList::WatchpointList() : m_watchpoints(), m_mutex() {}
WatchpointList::~WatchpointList() {}

View File

@ -28,7 +28,7 @@ bool WatchpointOptions::NullCallback(void *baton,
// WatchpointOptions constructor
WatchpointOptions::WatchpointOptions()
: m_callback(WatchpointOptions::NullCallback), m_callback_baton_sp(),
m_callback_is_synchronous(false), m_thread_spec_up() {}
m_thread_spec_up() {}
// WatchpointOptions copy constructor
WatchpointOptions::WatchpointOptions(const WatchpointOptions &rhs)

View File

@ -242,15 +242,8 @@ public:
class CommandOptions : public OptionGroup {
public:
CommandOptions()
: OptionGroup(), m_condition(), m_filenames(), m_line_num(0),
m_column(0), m_func_names(),
m_func_name_type_mask(eFunctionNameTypeNone), m_func_regexp(),
m_source_text_regexp(), m_modules(), m_load_addr(), m_catch_bp(false),
m_throw_bp(true), m_hardware(false),
m_exception_language(eLanguageTypeUnknown),
m_language(lldb::eLanguageTypeUnknown),
m_skip_prologue(eLazyBoolCalculate), m_all_files(false),
m_move_to_nearest_code(eLazyBoolCalculate) {}
: OptionGroup(), m_condition(), m_filenames(), m_func_names(),
m_func_regexp(), m_source_text_regexp(), m_modules() {}
~CommandOptions() override = default;
@ -500,25 +493,25 @@ public:
std::string m_condition;
FileSpecList m_filenames;
uint32_t m_line_num;
uint32_t m_column;
uint32_t m_line_num = 0;
uint32_t m_column = 0;
std::vector<std::string> m_func_names;
std::vector<std::string> m_breakpoint_names;
lldb::FunctionNameType m_func_name_type_mask;
lldb::FunctionNameType m_func_name_type_mask = eFunctionNameTypeNone;
std::string m_func_regexp;
std::string m_source_text_regexp;
FileSpecList m_modules;
lldb::addr_t m_load_addr;
lldb::addr_t m_load_addr = 0;
lldb::addr_t m_offset_addr;
bool m_catch_bp;
bool m_throw_bp;
bool m_hardware; // Request to use hardware breakpoints
lldb::LanguageType m_exception_language;
lldb::LanguageType m_language;
LazyBool m_skip_prologue;
bool m_all_files;
bool m_catch_bp = false;
bool m_throw_bp = true;
bool m_hardware = false; // Request to use hardware breakpoints
lldb::LanguageType m_exception_language = eLanguageTypeUnknown;
lldb::LanguageType m_language = lldb::eLanguageTypeUnknown;
LazyBool m_skip_prologue = eLazyBoolCalculate;
bool m_all_files = false;
Args m_exception_extra_args;
LazyBool m_move_to_nearest_code;
LazyBool m_move_to_nearest_code = eLazyBoolCalculate;
std::unordered_set<std::string> m_source_regex_func_names;
std::string m_current_key;
};
@ -1133,9 +1126,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions()
: Options(), m_level(lldb::eDescriptionLevelBrief), m_use_dummy(false) {
}
CommandOptions() : Options() {}
~CommandOptions() override = default;
@ -1179,10 +1170,10 @@ public:
// Instance variables to hold the values for command options.
lldb::DescriptionLevel m_level;
lldb::DescriptionLevel m_level = lldb::eDescriptionLevelBrief;
bool m_internal;
bool m_use_dummy;
bool m_use_dummy = false;
};
protected:
@ -1268,7 +1259,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options(), m_filename(), m_line_num(0) {}
CommandOptions() : Options(), m_filename() {}
~CommandOptions() override = default;
@ -1305,7 +1296,7 @@ public:
// Instance variables to hold the values for command options.
std::string m_filename;
uint32_t m_line_num;
uint32_t m_line_num = 0;
};
protected:
@ -1423,8 +1414,7 @@ public:
class CommandOptions : public Options {
public:
CommandOptions() : Options(), m_use_dummy(false), m_force(false),
m_delete_disabled(false) {}
CommandOptions() : Options() {}
~CommandOptions() override = default;
@ -1464,9 +1454,9 @@ public:
}
// Instance variables to hold the values for command options.
bool m_use_dummy;
bool m_force;
bool m_delete_disabled;
bool m_use_dummy = false;
bool m_force = false;
bool m_delete_disabled = false;
};
protected:

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