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

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 9 09:53:04 PDT 2020


shafik marked an inline comment as done.
shafik 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) ||
----------------
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.


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

https://reviews.llvm.org/D83433





More information about the lldb-commits mailing list