[Lldb-commits] [PATCH] D86660: Modifying ImportDeclContext(...) to ensure that we also handle the case when the FieldDecl is an ArrayType whose ElementType is a RecordDecl

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 26 13:53:35 PDT 2020


shafik created this revision.
shafik added reviewers: martong, teemperor.
Herald added a subscriber: rnkovacs.
shafik requested review of this revision.

When we fixed `ImportDeclContext(...)` in D71378 <https://reviews.llvm.org/D71378> to make sure we complete each `FieldDecl` of a `RecordDecl` when we are importing the definition we missed the case where a `FeildDecl` was an `ArrayType` whose `ElementType` is a record.

This fix was motivated by a codegen crash during LLDB expression parsing. Since we were not importing the definition we were crashing during layout which required all the records be defined.


https://reviews.llvm.org/D86660

Files:
  clang/lib/AST/ASTImporter.cpp
  lldb/test/API/commands/expression/codegen-crash-import-def-arraytype-element/Makefile
  lldb/test/API/commands/expression/codegen-crash-import-def-arraytype-element/TestImportDefinitionArrayType.py
  lldb/test/API/commands/expression/codegen-crash-import-def-arraytype-element/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86660.288106.patch
Type: text/x-patch
Size: 4546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200826/ba7c0873/attachment-0001.bin>


More information about the lldb-commits mailing list