[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Check DW_AT_declaration to determine static data members (PR #68300)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 5 04:50:49 PDT 2023
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 777a6e6f10b2b90496d248b7fa904fce834484be 30ef50b808a8458a60bbd3cdc52b866ee296b6ba -- lldb/test/API/lang/cpp/union-static-data-members/main.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
``````````
</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 ee35a7de80c1..436632473816 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -2933,8 +2933,8 @@ void DWARFASTParserClang::ParseSingleMember(
// whereas GCC emits it only for static data members if not part of an
// anonymous namespace. The flag that is consistently emitted for static
// data members is DW_AT_declaration, so we check it instead.
- // FIXME: Since DWARFv5, static data members are marked DW_AT_variable so we can
- // consistently detect them on both GCC and Clang without below heuristic.
+ // FIXME: Since DWARFv5, static data members are marked DW_AT_variable so we
+ // can consistently detect them on both GCC and Clang without below heuristic.
if (attrs.member_byte_offset == UINT32_MAX &&
attrs.data_bit_offset == UINT64_MAX && attrs.is_declaration) {
Type *var_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
``````````
</details>
https://github.com/llvm/llvm-project/pull/68300
More information about the lldb-commits
mailing list