This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Don't mark deleted special member functions as non-trivial
Changes PlannedPublic

Authored by royjacobson on Dec 25 2022, 1:54 PM.

Details

Summary

As noted in https://github.com/llvm/llvm-project/issues/59624, we sometimes mark implicitly
deleted special member functions as non-trivial. This is unnecessary work and leads to some
weird type traits errors.

This fixes the problem by making the implicitly deleted special member functions always
trivial.

Diff Detail

Event Timeline

royjacobson created this revision.Dec 25 2022, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 25 2022, 1:54 PM
royjacobson requested review of this revision.Dec 25 2022, 1:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 25 2022, 1:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
royjacobson edited the summary of this revision. (Show Details)Dec 25 2022, 1:55 PM
royjacobson added reviewers: shafik, chriselrod, Restricted Project.
chriselrod added inline comments.Dec 27 2022, 12:29 AM
clang/test/SemaCXX/GH59624.cpp
11–13

This isn't needed for the test.

erichkeane accepted this revision.Jan 3 2023, 8:17 AM
erichkeane added a subscriber: erichkeane.

Code changes LGTM. Dead CFoo obviously should be used or deleted.

This revision is now accepted and ready to land.Jan 3 2023, 8:17 AM
royjacobson edited the summary of this revision. (Show Details)

Rebase + remove extra class

This revision was landed with ongoing or failed builds.Jan 4 2023, 11:27 AM
This revision was automatically updated to reflect the committed changes.
royjacobson reopened this revision.Jan 5 2023, 1:43 PM

So, I had a quick look at this. Turns out this fix changed the argument passing ABI for those classes on the Sony PS4. This is probably not acceptable :)

Putting this behind an ABI compat/Sony flag is probably good enough in this case, will try to write it up next week.

This revision is now accepted and ready to land.Jan 5 2023, 1:43 PM
royjacobson planned changes to this revision.Jan 5 2023, 1:43 PM