[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 29 15:39:39 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 21be2fbd17f9ff6f3f04e0ababc91c9cdd5aed85 242da8f612a4d7ce4f58d4e61be05dff711e469f -- lldb/include/lldb/Core/ValueObject.h lldb/include/lldb/Core/ValueObjectCast.h lldb/include/lldb/Core/ValueObjectChild.h lldb/include/lldb/Core/ValueObjectConstResult.h lldb/include/lldb/Core/ValueObjectDynamicValue.h lldb/include/lldb/Core/ValueObjectMemory.h lldb/include/lldb/Core/ValueObjectRegister.h lldb/include/lldb/Core/ValueObjectSyntheticFilter.h lldb/include/lldb/Core/ValueObjectVTable.h lldb/include/lldb/Core/ValueObjectVariable.h lldb/include/lldb/DataFormatters/TypeSynthetic.h lldb/include/lldb/DataFormatters/VectorIterator.h lldb/include/lldb/Target/StackFrameRecognizer.h lldb/source/Core/ValueObjectCast.cpp lldb/source/Core/ValueObjectChild.cpp lldb/source/Core/ValueObjectConstResult.cpp lldb/source/Core/ValueObjectDynamicValue.cpp lldb/source/Core/ValueObjectMemory.cpp lldb/source/Core/ValueObjectRegister.cpp lldb/source/Core/ValueObjectSyntheticFilter.cpp lldb/source/Core/ValueObjectVTable.cpp lldb/source/Core/ValueObjectVariable.cpp lldb/source/DataFormatters/TypeSynthetic.cpp lldb/source/DataFormatters/VectorType.cpp lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp lldb/source/Plugins/Language/CPlusPlus/Coroutines.cpp lldb/source/Plugins/Language/CPlusPlus/Coroutines.h lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp lldb/source/Plugins/Language/CPlusPlus/GenericOptional.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxx.h lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxRangesRefView.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxSpan.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxValarray.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp lldb/source/Plugins/Language/ObjC/Cocoa.cpp lldb/source/Plugins/Language/ObjC/NSArray.cpp lldb/source/Plugins/Language/ObjC/NSDictionary.cpp lldb/source/Plugins/Language/ObjC/NSError.cpp lldb/source/Plugins/Language/ObjC/NSException.cpp lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp lldb/source/Plugins/Language/ObjC/NSSet.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Core/ValueObjectSyntheticFilter.cpp b/lldb/source/Core/ValueObjectSyntheticFilter.cpp
index b03bd9a80e..0c4ec14f18 100644
--- a/lldb/source/Core/ValueObjectSyntheticFilter.cpp
+++ b/lldb/source/Core/ValueObjectSyntheticFilter.cpp
@@ -31,7 +31,9 @@ public:
DummySyntheticFrontEnd(ValueObject &backend)
: SyntheticChildrenFrontEnd(backend) {}
- uint32_t CalculateNumChildren() override { return m_backend.GetNumChildren(); }
+ uint32_t CalculateNumChildren() override {
+ return m_backend.GetNumChildren();
+ }
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override {
return m_backend.GetChildAtIndex(idx);
diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp
index a05fbe9a73..bbf5462277 100644
--- a/lldb/source/DataFormatters/TypeSynthetic.cpp
+++ b/lldb/source/DataFormatters/TypeSynthetic.cpp
@@ -184,7 +184,8 @@ uint32_t ScriptedSyntheticChildren::FrontEnd::CalculateNumChildren() {
return m_interpreter->CalculateNumChildren(m_wrapper_sp, UINT32_MAX);
}
-uint32_t ScriptedSyntheticChildren::FrontEnd::CalculateNumChildren(uint32_t max) {
+uint32_t
+ScriptedSyntheticChildren::FrontEnd::CalculateNumChildren(uint32_t max) {
if (!m_wrapper_sp || m_interpreter == nullptr)
return 0;
return m_interpreter->CalculateNumChildren(m_wrapper_sp, max);
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
index b2249d2396..4f656ee7c3 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
@@ -371,7 +371,9 @@ LibStdcppSharedPtrSyntheticFrontEnd::LibStdcppSharedPtrSyntheticFrontEnd(
Update();
}
-uint32_t LibStdcppSharedPtrSyntheticFrontEnd::CalculateNumChildren() { return 1; }
+uint32_t LibStdcppSharedPtrSyntheticFrontEnd::CalculateNumChildren() {
+ return 1;
+}
lldb::ValueObjectSP
LibStdcppSharedPtrSyntheticFrontEnd::GetChildAtIndex(size_t idx) {
diff --git a/lldb/source/Plugins/Language/ObjC/NSArray.cpp b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
index 9ee12e50b8..07c682bd5a 100644
--- a/lldb/source/Plugins/Language/ObjC/NSArray.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSArray.cpp
@@ -634,9 +634,8 @@ lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
}
template <typename D32, typename D64, bool Inline>
-uint32_t
-lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<D32, D64, Inline>::
- CalculateNumChildren() {
+uint32_t lldb_private::formatters::GenericNSArrayISyntheticFrontEnd<
+ D32, D64, Inline>::CalculateNumChildren() {
return m_data_32 ? m_data_32->used : m_data_64->used;
}
diff --git a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
index 3bb2e4fac0..05a60e4aa4 100644
--- a/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
@@ -262,9 +262,9 @@ namespace Foundation1100 {
NSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
~NSDictionaryMSyntheticFrontEnd() override;
-
+
uint32_t CalculateNumChildren() override;
-
+
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
lldb::ChildCacheState Update() override;
@@ -1087,8 +1087,8 @@ size_t lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<
}
template <typename D32, typename D64>
-uint32_t
-lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<D32,D64>::CalculateNumChildren() {
+uint32_t lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd<
+ D32, D64>::CalculateNumChildren() {
if (!m_data_32 && !m_data_64)
return 0;
return (m_data_32 ? m_data_32->_used : m_data_64->_used);
@@ -1250,9 +1250,8 @@ lldb_private::formatters::Foundation1100::
return idx;
}
-uint32_t
-lldb_private::formatters::Foundation1100::
- NSDictionaryMSyntheticFrontEnd::CalculateNumChildren() {
+uint32_t lldb_private::formatters::Foundation1100::
+ NSDictionaryMSyntheticFrontEnd::CalculateNumChildren() {
if (!m_data_32 && !m_data_64)
return 0;
return (m_data_32 ? m_data_32->_used : m_data_64->_used);
diff --git a/lldb/source/Plugins/Language/ObjC/NSException.cpp b/lldb/source/Plugins/Language/ObjC/NSException.cpp
index e47939c718..2faaee1076 100644
--- a/lldb/source/Plugins/Language/ObjC/NSException.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSException.cpp
@@ -123,9 +123,7 @@ public:
~NSExceptionSyntheticFrontEnd() override = default;
- uint32_t CalculateNumChildren() override {
- return 4;
- }
+ uint32_t CalculateNumChildren() override { return 4; }
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override {
switch (idx) {
diff --git a/lldb/source/Plugins/Language/ObjC/NSSet.cpp b/lldb/source/Plugins/Language/ObjC/NSSet.cpp
index 97f19c1ac9..951e8c1d40 100644
--- a/lldb/source/Plugins/Language/ObjC/NSSet.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSSet.cpp
@@ -696,9 +696,8 @@ lldb_private::formatters::
}
template <typename D32, typename D64>
-uint32_t
-lldb_private::formatters::
- GenericNSSetMSyntheticFrontEnd<D32, D64>::CalculateNumChildren() {
+uint32_t lldb_private::formatters::GenericNSSetMSyntheticFrontEnd<
+ D32, D64>::CalculateNumChildren() {
if (!m_data_32 && !m_data_64)
return 0;
return (m_data_32 ? m_data_32->_used : m_data_64->_used);
``````````
</details>
https://github.com/llvm/llvm-project/pull/83501
More information about the lldb-commits
mailing list