Page MenuHomePhabricator

Mark invalid RecordDecls as completed.
ClosedPublic

Authored by erikjv on Jun 9 2016, 3:57 AM.

Details

Summary

Sema::ActOnTag creates TagDecls for records. However, if those record
declarations are invalid, and the parser is in C++ mode, it would
silently drop the TagDecl (and leave it as "beingDefined"). The problem
is that other code (e.g. the ASTWriter) will serialize all types, and
expects them to be complete. So, leaving them open would result in
failing asserts.

Fixes PR20320

Diff Detail

Repository
rL LLVM

Event Timeline

erikjv updated this revision to Diff 60152.Jun 9 2016, 3:57 AM
erikjv retitled this revision from to Mark invalid RecordDecls as completed..
erikjv updated this object.
erikjv added a reviewer: rsmith.
erikjv added a subscriber: cfe-commits.
rsmith accepted this revision.Oct 26 2016, 1:12 PM
rsmith edited edge metadata.
This revision is now accepted and ready to land.Oct 26 2016, 1:12 PM
This revision was automatically updated to reflect the committed changes.