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 395093ec150accf19b8158f9d2327ba470e92867 9cd8c9fd40ec13d6828d42a8693bf0dc9074d909 --extensions cpp,h -- lldb/include/lldb/Core/IOHandler.h lldb/include/lldb/DataFormatters/FormattersContainer.h lldb/include/lldb/DataFormatters/TypeFormat.h lldb/include/lldb/DataFormatters/TypeSynthetic.h lldb/include/lldb/Expression/ExpressionVariable.h lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h lldb/include/lldb/Target/LanguageRuntime.h lldb/include/lldb/Target/StackFrame.h lldb/include/lldb/Target/StackFrameRecognizer.h lldb/source/API/SBBlock.cpp lldb/source/API/SBFrame.cpp lldb/source/API/SBModule.cpp lldb/source/API/SBTarget.cpp lldb/source/API/SBThread.cpp lldb/source/API/SBType.cpp lldb/source/API/SBValue.cpp lldb/source/API/SBValueList.cpp lldb/source/Breakpoint/BreakpointLocation.cpp lldb/source/Breakpoint/Watchpoint.cpp lldb/source/Commands/CommandObjectDWIMPrint.cpp lldb/source/Commands/CommandObjectFrame.cpp lldb/source/Commands/CommandObjectMemory.cpp lldb/source/Commands/CommandObjectTarget.cpp lldb/source/Commands/CommandObjectThread.cpp lldb/source/Commands/CommandObjectWatchpoint.cpp lldb/source/Core/DumpRegisterValue.cpp lldb/source/Core/FormatEntity.cpp lldb/source/Core/IOHandlerCursesGUI.cpp lldb/source/DataFormatters/CXXFunctionPointer.cpp lldb/source/DataFormatters/DumpValueObjectOptions.cpp lldb/source/DataFormatters/FormatManager.cpp lldb/source/DataFormatters/StringPrinter.cpp lldb/source/DataFormatters/TypeSummary.cpp lldb/source/DataFormatters/ValueObjectPrinter.cpp lldb/source/DataFormatters/VectorType.cpp lldb/source/Expression/FunctionCaller.cpp lldb/source/Expression/IRInterpreter.cpp lldb/source/Expression/LLVMUserExpression.cpp lldb/source/Expression/Materializer.cpp lldb/source/Expression/UserExpression.cpp lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp lldb/source/Plugins/ABI/ARM/ABIMacOSX_arm.cpp lldb/source/Plugins/ABI/ARM/ABISysV_arm.cpp lldb/source/Plugins/ABI/Hexagon/ABISysV_hexagon.cpp lldb/source/Plugins/ABI/MSP430/ABISysV_msp430.cpp lldb/source/Plugins/ABI/Mips/ABISysV_mips.cpp lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp lldb/source/Plugins/ABI/X86/ABIMacOSX_i386.cpp lldb/source/Plugins/ABI/X86/ABISysV_i386.cpp lldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionUtil.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp lldb/source/Plugins/InstrumentationRuntime/Utility/ReportRetriever.cpp lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/source/Plugins/Language/CPlusPlus/Coroutines.h lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h lldb/source/Plugins/Language/CPlusPlus/Generic.h lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxx.h lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h 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/LibCxxProxyArray.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxRangesRefView.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxSpan.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxValarray.cpp lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.h lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.h lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp lldb/source/Plugins/Language/ObjC/CF.cpp lldb/source/Plugins/Language/ObjC/CF.h lldb/source/Plugins/Language/ObjC/Cocoa.cpp lldb/source/Plugins/Language/ObjC/Cocoa.h lldb/source/Plugins/Language/ObjC/CoreMedia.h lldb/source/Plugins/Language/ObjC/NSArray.cpp lldb/source/Plugins/Language/ObjC/NSDictionary.cpp lldb/source/Plugins/Language/ObjC/NSDictionary.h 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 lldb/source/Plugins/Language/ObjC/NSSet.h lldb/source/Plugins/Language/ObjC/NSString.cpp lldb/source/Plugins/Language/ObjC/NSString.h lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/GNUstepObjCRuntime.cpp lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp lldb/source/Plugins/SystemRuntime/MacOSX/AbortWithPayloadFrameRecognizer.cpp lldb/source/Symbol/Variable.cpp lldb/source/Target/ABI.cpp lldb/source/Target/StackFrame.cpp lldb/source/Target/StopInfo.cpp lldb/source/Target/Target.cpp lldb/source/Target/Thread.cpp lldb/source/Target/ThreadPlanStepOut.cpp lldb/unittests/ValueObject/DumpValueObjectOptionsTests.cpp lldb/include/lldb/ValueObject/ValueObject.h lldb/include/lldb/ValueObject/ValueObjectCast.h lldb/include/lldb/ValueObject/ValueObjectChild.h lldb/include/lldb/ValueObject/ValueObjectConstResult.h lldb/include/lldb/ValueObject/ValueObjectConstResultCast.h lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h lldb/include/lldb/ValueObject/ValueObjectDynamicValue.h lldb/include/lldb/ValueObject/ValueObjectList.h lldb/include/lldb/ValueObject/ValueObjectMemory.h lldb/include/lldb/ValueObject/ValueObjectRegister.h lldb/include/lldb/ValueObject/ValueObjectSyntheticFilter.h lldb/include/lldb/ValueObject/ValueObjectUpdater.h lldb/include/lldb/ValueObject/ValueObjectVTable.h lldb/include/lldb/ValueObject/ValueObjectVariable.h lldb/source/ValueObject/ValueObject.cpp lldb/source/ValueObject/ValueObjectCast.cpp lldb/source/ValueObject/ValueObjectChild.cpp lldb/source/ValueObject/ValueObjectConstResult.cpp lldb/source/ValueObject/ValueObjectConstResultCast.cpp lldb/source/ValueObject/ValueObjectConstResultChild.cpp lldb/source/ValueObject/ValueObjectConstResultImpl.cpp lldb/source/ValueObject/ValueObjectDynamicValue.cpp lldb/source/ValueObject/ValueObjectList.cpp lldb/source/ValueObject/ValueObjectMemory.cpp lldb/source/ValueObject/ValueObjectRegister.cpp lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp lldb/source/ValueObject/ValueObjectUpdater.cpp lldb/source/ValueObject/ValueObjectVTable.cpp lldb/source/ValueObject/ValueObjectVariable.cpp `````````` </details> <details> <summary> View the diff from clang-format here. </summary> ``````````diff diff --git a/lldb/include/lldb/ValueObject/ValueObject.h b/lldb/include/lldb/ValueObject/ValueObject.h index 93eb3e8f59..34541bd628 100644 --- a/lldb/include/lldb/ValueObject/ValueObject.h +++ b/lldb/include/lldb/ValueObject/ValueObject.h @@ -1004,8 +1004,8 @@ protected: } m_flags; friend class ValueObjectChild; - friend class ExpressionVariable; // For SetName - friend class Target; // For SetName + friend class ExpressionVariable; // For SetName + friend class Target; // For SetName friend class ValueObjectConstResultImpl; friend class ValueObjectSynthetic; // For ClearUserVisibleData @@ -1079,7 +1079,7 @@ protected: void SetPreferredDisplayLanguageIfNeeded(lldb::LanguageType); protected: - virtual void DoUpdateChildrenAddressType(ValueObject &valobj){}; + virtual void DoUpdateChildrenAddressType(ValueObject &valobj) {}; private: virtual CompilerType MaybeCalculateCompleteType(); diff --git a/lldb/include/lldb/ValueObject/ValueObjectCast.h b/lldb/include/lldb/ValueObject/ValueObjectCast.h index 740dd61f53..9265c2f00e 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectCast.h +++ b/lldb/include/lldb/ValueObject/ValueObjectCast.h @@ -27,8 +27,7 @@ class ValueObjectCast : public ValueObject { public: ~ValueObjectCast() override; - static lldb::ValueObjectSP Create(ValueObject &parent, - ConstString name, + static lldb::ValueObjectSP Create(ValueObject &parent, ConstString name, const CompilerType &cast_type); std::optional<uint64_t> GetByteSize() override; diff --git a/lldb/include/lldb/ValueObject/ValueObjectChild.h b/lldb/include/lldb/ValueObject/ValueObjectChild.h index 8930384167..610f3df5ad 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectChild.h +++ b/lldb/include/lldb/ValueObject/ValueObjectChild.h @@ -76,10 +76,9 @@ protected: friend class ValueObjectVTable; ValueObjectChild(ValueObject &parent, const CompilerType &compiler_type, - ConstString name, uint64_t byte_size, - int32_t byte_offset, uint32_t bitfield_bit_size, - uint32_t bitfield_bit_offset, bool is_base_class, - bool is_deref_of_parent, + ConstString name, uint64_t byte_size, int32_t byte_offset, + uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, + bool is_base_class, bool is_deref_of_parent, AddressType child_ptr_or_ref_addr_type, uint64_t language_flags); diff --git a/lldb/include/lldb/ValueObject/ValueObjectConstResult.h b/lldb/include/lldb/ValueObject/ValueObjectConstResult.h index 6945be3136..54878f520a 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectConstResult.h +++ b/lldb/include/lldb/ValueObject/ValueObjectConstResult.h @@ -50,10 +50,11 @@ public: lldb::ByteOrder byte_order, uint32_t addr_size, lldb::addr_t address = LLDB_INVALID_ADDRESS); - static lldb::ValueObjectSP - Create(ExecutionContextScope *exe_scope, const CompilerType &compiler_type, - ConstString name, lldb::addr_t address, - AddressType address_type, uint32_t addr_byte_size); + static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, + const CompilerType &compiler_type, + ConstString name, lldb::addr_t address, + AddressType address_type, + uint32_t addr_byte_size); static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, Value &value, ConstString name, diff --git a/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h b/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h index 875cec582e..e2440793e6 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h +++ b/lldb/include/lldb/ValueObject/ValueObjectConstResultChild.h @@ -28,14 +28,11 @@ class ValueObject; // A child of a ValueObjectConstResult. class ValueObjectConstResultChild : public ValueObjectChild { public: - ValueObjectConstResultChild(ValueObject &parent, - const CompilerType &compiler_type, - ConstString name, uint32_t byte_size, - int32_t byte_offset, uint32_t bitfield_bit_size, - uint32_t bitfield_bit_offset, bool is_base_class, - bool is_deref_of_parent, - lldb::addr_t live_address, - uint64_t language_flags); + ValueObjectConstResultChild( + ValueObject &parent, const CompilerType &compiler_type, ConstString name, + uint32_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size, + uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent, + lldb::addr_t live_address, uint64_t language_flags); ~ValueObjectConstResultChild() override; diff --git a/lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h b/lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h index 68ba8ae7fb..6f59c750ed 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h +++ b/lldb/include/lldb/ValueObject/ValueObjectConstResultImpl.h @@ -22,7 +22,7 @@ class CompilerType; class DataExtractor; class Status; class ValueObject; -} +} // namespace lldb_private namespace lldb_private { diff --git a/lldb/include/lldb/ValueObject/ValueObjectList.h b/lldb/include/lldb/ValueObject/ValueObjectList.h index fcb358e21a..dfd6a1bb7f 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectList.h +++ b/lldb/include/lldb/ValueObject/ValueObjectList.h @@ -51,6 +51,7 @@ public: const std::vector<lldb::ValueObjectSP> &GetObjects() const { return m_value_objects; } + protected: typedef std::vector<lldb::ValueObjectSP> collection; // Classes that inherit from ValueObjectList can see and modify these diff --git a/lldb/include/lldb/ValueObject/ValueObjectVariable.h b/lldb/include/lldb/ValueObject/ValueObjectVariable.h index 1056b1d742..43e89241b7 100644 --- a/lldb/include/lldb/ValueObject/ValueObjectVariable.h +++ b/lldb/include/lldb/ValueObject/ValueObjectVariable.h @@ -68,7 +68,7 @@ public: protected: bool UpdateValue() override; - + void DoUpdateChildrenAddressType(ValueObject &valobj) override; CompilerType GetCompilerTypeImpl() override; diff --git a/lldb/source/ValueObject/ValueObject.cpp b/lldb/source/ValueObject/ValueObject.cpp index 3eaa70d21d..4006f6e6fd 100644 --- a/lldb/source/ValueObject/ValueObject.cpp +++ b/lldb/source/ValueObject/ValueObject.cpp @@ -272,8 +272,6 @@ CompilerType ValueObject::MaybeCalculateCompleteType() { return compiler_type; } - - DataExtractor &ValueObject::GetDataExtractor() { UpdateValueIfNeeded(false); return m_data; @@ -584,8 +582,8 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, // a valid summary string or function because the type is not complete and // no member variables or member functions will be available. if (GetCompilerType().IsForcefullyCompleted()) { - destination = "<incomplete type>"; - return true; + destination = "<incomplete type>"; + return true; } // ideally we would like to bail out if passing NULL, but if we do so we end @@ -1731,8 +1729,7 @@ bool ValueObject::GetDeclaration(Declaration &decl) { return false; } -void ValueObject::AddSyntheticChild(ConstString key, - ValueObject *valobj) { +void ValueObject::AddSyntheticChild(ConstString key, ValueObject *valobj) { m_synthetic_children[key] = valobj; } @@ -2948,7 +2945,7 @@ ValueObjectSP ValueObject::AddressOf(Status &error) { } ValueObjectSP ValueObject::DoCast(const CompilerType &compiler_type) { - return ValueObjectCast::Create(*this, GetName(), compiler_type); + return ValueObjectCast::Create(*this, GetName(), compiler_type); } ValueObjectSP ValueObject::Cast(const CompilerType &compiler_type) { @@ -2969,9 +2966,8 @@ ValueObjectSP ValueObject::Cast(const CompilerType &compiler_type) { Status error; CompilerType my_type = GetCompilerType(); - ExecutionContextScope *exe_scope - = ExecutionContext(GetExecutionContextRef()) - .GetBestExecutionContextScope(); + ExecutionContextScope *exe_scope = + ExecutionContext(GetExecutionContextRef()).GetBestExecutionContextScope(); if (compiler_type.GetByteSize(exe_scope) <= GetCompilerType().GetByteSize(exe_scope) || m_value.GetValueType() == Value::ValueType::LoadAddress) @@ -3763,8 +3759,6 @@ bool ValueObject::CanProvideValue() { return (!type.IsValid()) || (0 != (type.GetTypeInfo() & eTypeHasValue)); } - - ValueObjectSP ValueObject::Persist() { if (!UpdateValueIfNeeded()) return nullptr; diff --git a/lldb/source/ValueObject/ValueObjectCast.cpp b/lldb/source/ValueObject/ValueObjectCast.cpp index d7a708529c..6241f23979 100644 --- a/lldb/source/ValueObject/ValueObjectCast.cpp +++ b/lldb/source/ValueObject/ValueObjectCast.cpp @@ -43,8 +43,7 @@ CompilerType ValueObjectCast::GetCompilerTypeImpl() { return m_cast_type; } llvm::Expected<uint32_t> ValueObjectCast::CalculateNumChildren(uint32_t max) { ExecutionContext exe_ctx(GetExecutionContextRef()); - auto children_count = GetCompilerType().GetNumChildren( - true, &exe_ctx); + auto children_count = GetCompilerType().GetNumChildren(true, &exe_ctx); if (!children_count) return children_count; return *children_count <= max ? *children_count : max; diff --git a/lldb/source/ValueObject/ValueObjectChild.cpp b/lldb/source/ValueObject/ValueObjectChild.cpp index 3a8adf2347..ea21153059 100644 --- a/lldb/source/ValueObject/ValueObjectChild.cpp +++ b/lldb/source/ValueObject/ValueObjectChild.cpp @@ -27,10 +27,9 @@ using namespace lldb_private; ValueObjectChild::ValueObjectChild( - ValueObject &parent, const CompilerType &compiler_type, - ConstString name, uint64_t byte_size, int32_t byte_offset, - uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, - bool is_base_class, bool is_deref_of_parent, + ValueObject &parent, const CompilerType &compiler_type, ConstString name, + uint64_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size, + uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent, AddressType child_ptr_or_ref_addr_type, uint64_t language_flags) : ValueObject(parent), m_compiler_type(compiler_type), m_byte_size(byte_size), m_byte_offset(byte_offset), @@ -200,8 +199,7 @@ bool ValueObjectChild::UpdateValue() { GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped)); if (GetCompilerType().GetTypeInfo() & lldb::eTypeHasValue) { Value &value = is_instance_ptr_base ? m_parent->GetValue() : m_value; - m_error = - value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); + m_error = value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); } else { m_error.Clear(); // No value so nothing to read... } diff --git a/lldb/source/ValueObject/ValueObjectConstResult.cpp b/lldb/source/ValueObject/ValueObjectConstResult.cpp index 9aef6f2d70..ba4f7aa244 100644 --- a/lldb/source/ValueObject/ValueObjectConstResult.cpp +++ b/lldb/source/ValueObject/ValueObjectConstResult.cpp @@ -97,8 +97,7 @@ ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope, } ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope, - Value &value, - ConstString name, + Value &value, ConstString name, Module *module) { auto manager_sp = ValueObjectManager::Create(); return (new ValueObjectConstResult(exe_scope, *manager_sp, value, name, @@ -141,8 +140,7 @@ ValueObjectConstResult::ValueObjectConstResult( ExecutionContextScope *exe_scope, ValueObjectManager &manager, const CompilerType &compiler_type, ConstString name, lldb::addr_t address, AddressType address_type, uint32_t addr_byte_size) - : ValueObject(exe_scope, manager), m_type_name(), - m_impl(this, address) { + : ValueObject(exe_scope, manager), m_type_name(), m_impl(this, address) { m_value.GetScalar() = address; m_data.SetAddressByteSize(addr_byte_size); m_value.GetScalar().GetData(m_data, addr_byte_size); @@ -208,8 +206,8 @@ lldb::ValueType ValueObjectConstResult::GetValueType() const { std::optional<uint64_t> ValueObjectConstResult::GetByteSize() { ExecutionContext exe_ctx(GetExecutionContextRef()); if (!m_byte_size) { - if (auto size = - GetCompilerType().GetByteSize(exe_ctx.GetBestExecutionContextScope())) + if (auto size = GetCompilerType().GetByteSize( + exe_ctx.GetBestExecutionContextScope())) SetByteSize(*size); } return m_byte_size; diff --git a/lldb/source/ValueObject/ValueObjectConstResultChild.cpp b/lldb/source/ValueObject/ValueObjectConstResultChild.cpp index a9c6d6cdc9..b1c800dfe8 100644 --- a/lldb/source/ValueObject/ValueObjectConstResultChild.cpp +++ b/lldb/source/ValueObject/ValueObjectConstResultChild.cpp @@ -22,11 +22,10 @@ class ValueObject; using namespace lldb_private; ValueObjectConstResultChild::ValueObjectConstResultChild( - ValueObject &parent, const CompilerType &compiler_type, - ConstString name, uint32_t byte_size, int32_t byte_offset, - uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, - bool is_base_class, bool is_deref_of_parent, lldb::addr_t live_address, - uint64_t language_flags) + ValueObject &parent, const CompilerType &compiler_type, ConstString name, + uint32_t byte_size, int32_t byte_offset, uint32_t bitfield_bit_size, + uint32_t bitfield_bit_offset, bool is_base_class, bool is_deref_of_parent, + lldb::addr_t live_address, uint64_t language_flags) : ValueObjectChild(parent, compiler_type, name, byte_size, byte_offset, bitfield_bit_size, bitfield_bit_offset, is_base_class, is_deref_of_parent, eAddressTypeLoad, language_flags), @@ -51,8 +50,9 @@ lldb::ValueObjectSP ValueObjectConstResultChild::AddressOf(Status &error) { return m_impl.AddressOf(error); } -lldb::addr_t ValueObjectConstResultChild::GetAddressOf( - bool scalar_is_load_address, AddressType* address_type) { +lldb::addr_t +ValueObjectConstResultChild::GetAddressOf(bool scalar_is_load_address, + AddressType *address_type) { return m_impl.GetAddressOf(scalar_is_load_address, address_type); } diff --git a/lldb/source/ValueObject/ValueObjectConstResultImpl.cpp b/lldb/source/ValueObject/ValueObjectConstResultImpl.cpp index 58a3d58cec..d79f655b01 100644 --- a/lldb/source/ValueObject/ValueObjectConstResultImpl.cpp +++ b/lldb/source/ValueObject/ValueObjectConstResultImpl.cpp @@ -36,8 +36,7 @@ using namespace lldb_private; ValueObjectConstResultImpl::ValueObjectConstResultImpl( ValueObject *valobj, lldb::addr_t live_address) : m_impl_backend(valobj), m_live_address(live_address), - m_live_address_type(eAddressTypeLoad), - m_address_of_backend() {} + m_live_address_type(eAddressTypeLoad), m_address_of_backend() {} lldb::ValueObjectSP ValueObjectConstResultImpl::Dereference(Status &error) { if (m_impl_backend == nullptr) diff --git a/lldb/source/ValueObject/ValueObjectDynamicValue.cpp b/lldb/source/ValueObject/ValueObjectDynamicValue.cpp index cf056e696d..588c644bbf 100644 --- a/lldb/source/ValueObject/ValueObjectDynamicValue.cpp +++ b/lldb/source/ValueObject/ValueObjectDynamicValue.cpp @@ -203,7 +203,7 @@ bool ValueObjectDynamicValue::UpdateValue() { // If we don't have a dynamic type, set ourselves to be invalid and return // false. We used to try to produce a dynamic ValueObject that behaved "like" - // its parent, but that failed for ValueObjectConstResult, which is too + // its parent, but that failed for ValueObjectConstResult, which is too // complex a beast to try to emulate. If we return an invalid ValueObject, // clients will end up getting the static value instead, which behaves // correctly. diff --git a/lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp b/lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp index ee3e5bcef3..fbb329b089 100644 --- a/lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp +++ b/lldb/source/ValueObject/ValueObjectSyntheticFilter.cpp @@ -143,11 +143,9 @@ lldb::ValueType ValueObjectSynthetic::GetValueType() const { void ValueObjectSynthetic::CreateSynthFilter() { ValueObject *valobj_for_frontend = m_parent; - if (m_synth_sp->WantsDereference()) - { + if (m_synth_sp->WantsDereference()) { CompilerType type = m_parent->GetCompilerType(); - if (type.IsValid() && type.IsPointerOrReferenceType()) - { + if (type.IsValid() && type.IsPointerOrReferenceType()) { Status error; lldb::ValueObjectSP deref_sp = m_parent->Dereference(error); if (error.Success()) diff --git a/lldb/source/ValueObject/ValueObjectVTable.cpp b/lldb/source/ValueObject/ValueObjectVTable.cpp index a0fc235a67..7171154339 100644 --- a/lldb/source/ValueObject/ValueObjectVTable.cpp +++ b/lldb/source/ValueObject/ValueObjectVTable.cpp @@ -84,7 +84,6 @@ protected: return false; } - // Set our value to be the load address of the function pointer in memory // and our type to be the function pointer type. m_value.SetValueType(Value::ValueType::LoadAddress); @@ -109,7 +108,7 @@ protected: // the language from it correctly. ValueObject *val = parent->GetParent(); auto type_system = target_sp->GetScratchTypeSystemForLanguage( - val ? val->GetObjectRuntimeLanguage() : eLanguageTypeC_plus_plus); + val ? val->GetObjectRuntimeLanguage() : eLanguageTypeC_plus_plus); if (type_system) { m_value.SetCompilerType( (*type_system)->CreateGenericFunctionPrototype().GetPointerType()); @@ -124,7 +123,7 @@ protected: if (m_error.Success()) { const bool thread_and_frame_only_if_stopped = true; ExecutionContext exe_ctx( - GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped)); + GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped)); m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); } SetValueDidChange(true); @@ -255,7 +254,7 @@ bool ValueObjectVTable::UpdateValue() { m_value.SetValueType(Value::ValueType::LoadAddress); m_value.GetScalar() = parent->GetAddressOf(); auto type_system_or_err = - target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC_plus_plus); + target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC_plus_plus); if (type_system_or_err) { m_value.SetCompilerType( (*type_system_or_err)->GetBasicTypeFromAST(eBasicTypeUnsignedLong)); diff --git a/lldb/source/ValueObject/ValueObjectVariable.cpp b/lldb/source/ValueObject/ValueObjectVariable.cpp index 6f12e1f1c1..db664ce9a7 100644 --- a/lldb/source/ValueObject/ValueObjectVariable.cpp +++ b/lldb/source/ValueObject/ValueObjectVariable.cpp @@ -209,8 +209,7 @@ bool ValueObjectVariable::UpdateValue() { case Value::ValueType::Scalar: // The variable value is in the Scalar value inside the m_value. We can // point our m_data right to it. - m_error = - m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); + m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); break; case Value::ValueType::FileAddress: @@ -238,8 +237,7 @@ bool ValueObjectVariable::UpdateValue() { // extract read its value into m_data appropriately Value value(m_value); value.SetContext(Value::ContextType::Variable, variable); - m_error = - value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); + m_error = value.GetValueAsData(&exe_ctx, m_data, GetModule().get()); SetValueDidChange(value_type != old_value.GetValueType() || m_value.GetScalar() != old_value.GetScalar()); @@ -311,8 +309,6 @@ void ValueObjectVariable::DoUpdateChildrenAddressType(ValueObject &valobj) { } } - - bool ValueObjectVariable::IsInScope() { const ExecutionContextRef &exe_ctx_ref = GetExecutionContextRef(); if (exe_ctx_ref.HasFrameRef()) { `````````` </details> https://github.com/llvm/llvm-project/pull/113393 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits