Page MenuHomePhabricator

[Clang] Implement LWG3823 for __is_aggregate
ClosedPublic

Authored by royjacobson on Nov 23 2022, 1:22 PM.

Details

Summary

LWG3823 says that arrays of incomplete types are aggregates. Fix the clang builtin to match that.

Closes https://github.com/llvm/llvm-project/issues/59002

Diff Detail

Event Timeline

royjacobson created this revision.Nov 23 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 1:22 PM
royjacobson requested review of this revision.Nov 23 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 1:22 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
royjacobson edited the summary of this revision. (Show Details)Nov 23 2022, 1:23 PM
cjdb accepted this revision.Nov 28 2022, 9:21 AM

LGTM. Thanks for fixing this!

This revision is now accepted and ready to land.Nov 28 2022, 9:21 AM
shafik added inline comments.Nov 28 2022, 11:04 AM
clang/test/SemaCXX/type-traits.cpp
556

Should this be true now or am I misunderstanding.

cjdb added inline comments.Nov 28 2022, 11:20 AM
clang/test/SemaCXX/type-traits.cpp
556

This should stay false, because the change is only concerned with arrays of incomplete types.

royjacobson marked an inline comment as done.Nov 28 2022, 2:41 PM
royjacobson added inline comments.
clang/test/SemaCXX/type-traits.cpp
556

Should this be true now or am I misunderstanding.

If you refer to the 'or cv' part, I think you're mixing up the completeness precondition with the builtin's actual value.

royjacobson edited the summary of this revision. (Show Details)

rebase to retry CI

This revision was landed with ongoing or failed builds.Nov 29 2022, 4:58 AM
This revision was automatically updated to reflect the committed changes.