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 origin/main HEAD --extensions cpp --
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 4e5f11019..b60f1d9e4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2605,9 +2605,10 @@ VariantMember::VariantMember(DWARFDIE &die,
lldb::ModuleSP module_sp) {
DWARFFormValue discr_form;
die.GetDIE()->GetAttributeValue(die.GetCU(), DW_AT_discr_value, discr_form);
- // Rust can output 128-bit discriminants (e.g. NonNull<u128>) as
`DW_FORM_block1`.
- // There is a `data16` dwarf form, but DWARFFormValue treats it as a
BlockData anyway.
- // Handling is included for it just in case rust's output changes to the
`data16` form.
+ // Rust can output 128-bit discriminants (e.g. NonNull<u128>) as
+ // `DW_FORM_block1`. There is a `data16` dwarf form, but DWARFFormValue
treats
+ // it as a BlockData anyway. Handling is included for it just in case rust's
+ // output changes to the `data16` form.
dw_form_t form = discr_form.Form();
if ((form == DW_FORM_block1 && discr_form.Unsigned() == 16) ||
form == DW_FORM_data16) {
@@ -2623,8 +2624,7 @@ VariantMember::VariantMember(DWARFDIE &die,
lldb::ModuleSP module_sp) {
} else {
if (auto result =
die.GetAttributeValueAsOptionalUnsigned(DW_AT_discr_value)) {
- this->discr_value =
- llvm::APInt(sizeof(uint64_t) * 8, result.value());
+ this->discr_value = llvm::APInt(sizeof(uint64_t) * 8, result.value());
} else {
this->discr_value = std::nullopt;
};
diff --git a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
index 5f6c71798..24ef859a0 100644
--- a/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
+++ b/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
@@ -2146,6 +2146,7 @@ TEST_F(DWARFASTParserClangTests, TestRustVariantMember) {
ASSERT_EQ(f_name, "$variant$0");
all_variants.GetFieldAtIndex(1, f_name, nullptr, nullptr, nullptr);
- // 0x16151413121110090807060504030201 ==
29352461300415899028694309177919734273
+ // 0x16151413121110090807060504030201 ==
+ // 29352461300415899028694309177919734273
ASSERT_EQ(f_name, "$variant$29352461300415899028694309177919734273");
}
\ No newline at end of file
``````````
</details>
https://github.com/llvm/llvm-project/pull/188487
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits