[Lldb-commits] [PATCH] D83433: Fix how we handle bit-fields for Objective-C when creating an AST

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 9 11:00:02 PDT 2020


aprantl added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2612
 
-            if ((this_field_info.bit_offset >= parent_bit_size) ||
-                (last_field_info.IsBitfield() &&
-                 !last_field_info.NextBitfieldOffsetIsValid(
-                     this_field_info.bit_offset))) {
+            if (class_language != eLanguageTypeObjC &&
+                ((this_field_info.bit_offset >= parent_bit_size) ||
----------------
shafik wrote:
> aprantl wrote:
> > I think we should add a comment here explaining why this doesn't apply to Objective-C. Also, what about a C struct in Objective-C, or a C++ class in Objective-C++?
> This is a great point! I think this check will probably be better:
> 
> ```
> !TypeSystemClang::IsObjCObjectOrInterfaceType(class_clang_type)
> ```
> 
> Let me try it out.
That sounds right to me.


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

https://reviews.llvm.org/D83433





More information about the lldb-commits mailing list