[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/75865 >From 8d67e8c5d38913e4c57690cb09f92a4211d88229 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 7 Dec 2023 12:14:01 -1000 Subject: [PATCH] [lldb] Improve maintainability and readability for ValueObject

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. simple formatting changes and this is good to go https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
@@ -2727,39 +2730,48 @@ ValueObjectSP ValueObject::AddressOf(Status &error) { const bool scalar_is_load_address = false; addr_t addr = GetAddressOf(scalar_is_load_address, &address_type); error.Clear(); - if (addr != LLDB_INVALID_ADDRESS && address_type != eAddressTypeHo

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Alex Langford via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Alex Langford via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Alex Langford via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Alex Langford via lldb-commits
@@ -1623,62 +1623,68 @@ bool ValueObject::IsUninitializedReference() { ValueObjectSP ValueObject::GetSyntheticArrayMember(size_t index, bool can_create) { - ValueObjectSP synthetic_child_sp; - if (IsPointerType() || IsArrayT

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Alex Langford via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Jonas Devlieghere via lldb-commits
@@ -1700,13 +1706,13 @@ ValueObjectSP ValueObject::GetSyntheticChildAtOffset( return synthetic_child_sp; if (!can_create) -return {}; +return ValueObjectSP(); JDevlieghere wrote: I'm possibly biased as the author of the [modernize-return-braced-

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Alex Langford via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/75865 >From b26dbee59abf1168a395b7852f05fb12771dc6e4 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 7 Dec 2023 12:14:01 -1000 Subject: [PATCH] [lldb] Improve maintainability and readability for ValueObject

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1700,13 +1706,13 @@ ValueObjectSP ValueObject::GetSyntheticChildAtOffset( return synthetic_child_sp; if (!can_create) -return {}; +return ValueObjectSP(); PortalPete wrote: This one is more about consistency because the vast majority of the

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2024-01-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2024-01-24 Thread via lldb-commits
jimingham wrote: The reason that we use ValueObjectSP() returns rather than {} in a lot of this code is because the `return {}` construct came along with C++11, which was not available when most of this code was written. I don't think anyone would mind switching over to {}. I usually like to