aboutsummaryrefslogtreecommitdiff
path: root/lldb/include/lldb/DataFormatters
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
commit344a3780b2e33f6ca763666c380202b18aab72a3 (patch)
treef0b203ee6eb71d7fdd792373e3c81eb18d6934dd /lldb/include/lldb/DataFormatters
parentb60736ec1405bb0a8dd40989f67ef4c93da068ab (diff)
downloadsrc-344a3780b2e33f6ca763666c380202b18aab72a3.tar.gz
src-344a3780b2e33f6ca763666c380202b18aab72a3.zip
the upstream release/13.x branch was created.
Diffstat (limited to 'lldb/include/lldb/DataFormatters')
-rw-r--r--lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h11
-rw-r--r--lldb/include/lldb/DataFormatters/FormatClasses.h4
-rw-r--r--lldb/include/lldb/DataFormatters/FormattersHelpers.h2
-rw-r--r--lldb/include/lldb/DataFormatters/TypeFormat.h6
-rw-r--r--lldb/include/lldb/DataFormatters/TypeSummary.h10
-rw-r--r--lldb/include/lldb/DataFormatters/TypeSynthetic.h6
-rw-r--r--lldb/include/lldb/DataFormatters/ValueObjectPrinter.h2
7 files changed, 20 insertions, 21 deletions
diff --git a/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h b/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
index 2f3bdf80a6f1..cef43f45b8e4 100644
--- a/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
+++ b/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
@@ -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() = default;
PointerAsArraySettings(size_t elem_count, size_t base_elem = 0,
size_t stride = 1)
@@ -62,8 +61,6 @@ public:
DumpValueObjectOptions();
- DumpValueObjectOptions(const DumpValueObjectOptions &rhs) = default;
-
DumpValueObjectOptions(ValueObject &valobj);
DumpValueObjectOptions &
diff --git a/lldb/include/lldb/DataFormatters/FormatClasses.h b/lldb/include/lldb/DataFormatters/FormatClasses.h
index e3989133a602..b8540de3d740 100644
--- a/lldb/include/lldb/DataFormatters/FormatClasses.h
+++ b/lldb/include/lldb/DataFormatters/FormatClasses.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/FormattersHelpers.h b/lldb/include/lldb/DataFormatters/FormattersHelpers.h
index a5b0da57e5d8..892807063b9c 100644
--- a/lldb/include/lldb/DataFormatters/FormattersHelpers.h
+++ b/lldb/include/lldb/DataFormatters/FormattersHelpers.h
@@ -36,11 +36,13 @@ void AddOneLineSummary(TypeCategoryImpl::SharedPointer category_sp,
ConstString type_name, TypeSummaryImpl::Flags flags,
bool regex = false);
+/// Add a summary that is implemented by a C++ callback.
void AddCXXSummary(TypeCategoryImpl::SharedPointer category_sp,
CXXFunctionSummaryFormat::Callback funct,
const char *description, ConstString type_name,
TypeSummaryImpl::Flags flags, bool regex = false);
+/// Add a synthetic that is implemented by a C++ callback.
void AddCXXSynthetic(TypeCategoryImpl::SharedPointer category_sp,
CXXSyntheticChildren::CreateFrontEndCallback generator,
const char *description, ConstString type_name,
diff --git a/lldb/include/lldb/DataFormatters/TypeFormat.h b/lldb/include/lldb/DataFormatters/TypeFormat.h
index b8ed6a3443b3..4e19d4cb14a1 100644
--- a/lldb/include/lldb/DataFormatters/TypeFormat.h
+++ b/lldb/include/lldb/DataFormatters/TypeFormat.h
@@ -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;
diff --git a/lldb/include/lldb/DataFormatters/TypeSummary.h b/lldb/include/lldb/DataFormatters/TypeSummary.h
index ce3195dbb693..30bc8cbf3feb 100644
--- a/lldb/include/lldb/DataFormatters/TypeSummary.h
+++ b/lldb/include/lldb/DataFormatters/TypeSummary.h
@@ -9,7 +9,7 @@
#ifndef LLDB_DATAFORMATTERS_TYPESUMMARY_H
#define LLDB_DATAFORMATTERS_TYPESUMMARY_H
-#include <stdint.h>
+#include <cstdint>
#include <functional>
#include <memory>
@@ -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() = default;
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(); }
diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
index fa1458281f1e..24322bd51a0c 100644
--- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h
+++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h
@@ -9,7 +9,7 @@
#ifndef LLDB_DATAFORMATTERS_TYPESYNTHETIC_H
#define LLDB_DATAFORMATTERS_TYPESYNTHETIC_H
-#include <stdint.h>
+#include <cstdint>
#include <functional>
#include <initializer_list>
@@ -133,7 +133,7 @@ class SyntheticChildren {
public:
class Flags {
public:
- Flags() : m_flags(lldb::eTypeOptionCascade) {}
+ Flags() = default;
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) {}
diff --git a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
index f1301d8595b1..833cd5eea356 100644
--- a/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
+++ b/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
@@ -27,7 +27,7 @@ public:
ValueObjectPrinter(ValueObject *valobj, Stream *s,
const DumpValueObjectOptions &options);
- ~ValueObjectPrinter() {}
+ ~ValueObjectPrinter() = default;
bool PrintValueObject();