[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 cfe-commits
cfe-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/cfe-commits/attachments/20191211/d43416a1/attachment-0001.bin>
More information about the cfe-commits
mailing list