This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix crash when creating deduction guide.
ClosedPublic

Authored by adamcz on Mar 4 2021, 9:14 AM.

Details

Summary

We used to trigger assertion when transforming c-tor with unparsed
default argument. Now we ignore such constructors for this purpose.

Diff Detail

Event Timeline

adamcz requested review of this revision.Mar 4 2021, 9:14 AM
adamcz created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2021, 9:14 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein accepted this revision.Mar 7 2021, 11:54 PM

Thanks!

clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
425

The diagnostic seems bogus, but I think it is at least better than crashing, I'd add add a FIXME to fix this bogus diagnostic here?.

This revision is now accepted and ready to land.Mar 7 2021, 11:54 PM
adamcz updated this revision to Diff 329346.Mar 9 2021, 7:41 AM

expanded a comment

clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
425

I added a line about improving the diagnostic. I'm a bit hesitant to leave a FIXME, since it doesn't seem like something actually worth spending time on. Just a weird corner case on broken code.

This revision was landed with ongoing or failed builds.Mar 9 2021, 8:02 AM
This revision was automatically updated to reflect the committed changes.