This is an archive of the discontinued LLVM Phabricator instance.

[clang] CWG 2354: prohibit alignas for enums
ClosedPublic

Authored by Endill on Mar 15 2022, 11:16 AM.

Diff Detail

Event Timeline

Endill created this revision.Mar 15 2022, 11:16 AM
Herald added a project: Restricted Project. · View Herald Transcript
Endill requested review of this revision.Mar 15 2022, 11:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2022, 11:16 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Endill added a subscriber: Restricted Project.Mar 15 2022, 11:19 AM
erichkeane accepted this revision.Mar 15 2022, 11:37 AM
erichkeane added a subscriber: erichkeane.

Please just note in the comment for the C++11 bit that it is modified by CWG2354, otherwise I think this is good.

clang/lib/Sema/SemaDeclAttr.cpp
4291

Can you add a comment up near here updating this?

This revision is now accepted and ready to land.Mar 15 2022, 11:37 AM
Endill updated this revision to Diff 415524.Mar 15 2022, 11:43 AM

Fix warning about clang-format being missing

aaron.ballman accepted this revision.Mar 15 2022, 11:47 AM

LGTM aside from a tiny testing nit. It's interesting that WG14 doesn't seem to have a similar DR reported them that I can find (nothing for you to do about it).

clang/test/CXX/drs/dr2354.cpp
2
Endill updated this revision to Diff 415529.Mar 15 2022, 11:50 AM

Add a quote from CWG 2354 after a quote from C++11

erichkeane accepted this revision.Mar 15 2022, 11:51 AM
Endill added inline comments.Mar 15 2022, 11:56 AM
clang/lib/Sema/SemaDeclAttr.cpp
4291

Like this? I can also quote the same paragraph from C++20, where this DR is already applied.

Can somebody commit this? I don't have commit access.

Can somebody commit this? I don't have commit access.

Hi, what's your prefered name and email addressed? I would love to commit it.

Can somebody commit this? I don't have commit access.

Hi, what's your prefered name and email addressed? I would love to commit it.

Vlad Serebrennikov
serebrennikov.vladislav@gmail.com

This revision was automatically updated to reflect the committed changes.