[Lldb-commits] [PATCH] D76808: Fix handling of bit-fields when there is a base class when parsing DWARF

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 26 15:14:48 PDT 2020


shafik added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2671
               // If we have a gap between the last_field_end and the current
               // field we have an unnamed bit-field
               if (this_field_info.bit_offset != last_field_end &&
----------------
aprantl wrote:
> do we need to amend the comment to describe the new conditions?
Good catch, I forgot about that.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2674
+                  !(this_field_info.bit_offset < last_field_end) &&
+                  !(last_field_info.bit_offset == 0 &&
+                    last_field_info.bit_size == 0 &&
----------------
aprantl wrote:
> ```
> (last_field_info.bit_offset > 0) ||
> (last_field_info.bit_size > 0) ||
> !layout_info.base_offsets.size())
> ```
> 
> Does this get more readable if you sink the ! into the subexpressions?
I see what your doing but it feels too clever, I would never get what it means coming back to it a couple of months from now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76808/new/

https://reviews.llvm.org/D76808





More information about the lldb-commits mailing list