This is an archive of the discontinued LLVM Phabricator instance.

[Sema] PR25156 Crash when parsing dtor call on incomplete type
ClosedPublic

Authored by hintonda on Feb 11 2016, 8:18 AM.

Details

Reviewers
rjmccall
Summary

Fix crash from PR25156 where getDestructorName() calls LookupQualifiedName() on incomplete type.

Event Timeline

hintonda updated this revision to Diff 47652.Feb 11 2016, 8:18 AM
hintonda retitled this revision from to When trying to get destructor name, make we have a complete type before calling LookupQualifiedName(), which will assert otherwise..
hintonda updated this object.
hintonda added reviewers: doug.gregor, majnemer.
hintonda added a subscriber: cfe-commits.
hintonda updated this revision to Diff 47914.Feb 13 2016, 8:41 AM
  • Simplify diff
hintonda retitled this revision from When trying to get destructor name, make we have a complete type before calling LookupQualifiedName(), which will assert otherwise. to [Sema] PR25156 When trying to get destructor name, make we have a complete type before calling LookupQualifiedName(), which will assert otherwise..Feb 13 2016, 8:45 AM
hintonda retitled this revision from [Sema] PR25156 When trying to get destructor name, make we have a complete type before calling LookupQualifiedName(), which will assert otherwise. to [Sema] PR25156 Crash when calling dtor on incomplete type.
hintonda retitled this revision from [Sema] PR25156 Crash when calling dtor on incomplete type to [Sema] PR25156 Crash when parsing dtor call on incomplete type.Feb 18 2016, 10:27 PM
hintonda updated this revision to Diff 102049.Jun 9 2017, 10:12 AM

Rebase and move test to existing file.

hintonda edited reviewers, added: rjmccall; removed: majnemer, nicholas, doug.gregor.Jun 9 2017, 1:28 PM
rjmccall added inline comments.Jun 9 2017, 5:39 PM
lib/Sema/SemaExprCXX.cpp
192–194

You should probably respond to the incomplete context within this case (by returning nullptr, I guess) instead of falling down into the else.

hintonda updated this revision to Diff 102103.Jun 9 2017, 6:03 PM
  • Addressed comments.
rjmccall accepted this revision.Jun 10 2017, 8:55 PM

Thanks, looks great.

If you're going to be submitting multiple patches, you should really ask for commit access; it's not an arduous process.

This revision is now accepted and ready to land.Jun 10 2017, 8:55 PM
hintonda closed this revision.Jun 11 2017, 7:40 PM

Committed in r305169.