[Lldb-commits] [PATCH] D71378: Modifying ImportDeclContext(...) to ensure that we complete each FieldDecl of a RecordDecl when we are importing the definiton

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 11 15:51:52 PST 2019


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

This fix was motivated by a crashes in expression parsing during code generation in which we had a `RecordDecl` that had incomplete `FieldDecl`. During code generation when computing the layout for the `RecordDecl` we crash because we have several incomplete `FieldDecl`.

This fixes the issue by assuring that during `ImportDefinition(...)` for a `RecordDecl` we also import the definitions for each `FieldDecl`.


https://reviews.llvm.org/D71378

Files:
  clang/lib/AST/ASTImporter.cpp
  lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
  lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
  lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71378.233460.patch
Type: text/x-patch
Size: 4104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191211/d43416a1/attachment.bin>


More information about the lldb-commits mailing list