Re: [PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-23 Thread Yvan Roux via cfe-commits
On Fri, 21 Jun 2019 at 19:38, Richard Smith wrote: > > Thanks, should hopefully be fixed by r364081. Problem fixed, Thanks richard. > On Fri, 21 Jun 2019 at 01:12, Yvan Roux via cfe-commits > wrote: >> >> Hi Richard, >> >> This commit broke ARM bots, logs are available here: >> >> http://lab.l

Re: [PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-21 Thread Richard Smith via cfe-commits
Thanks, should hopefully be fixed by r364081. On Fri, 21 Jun 2019 at 01:12, Yvan Roux via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard, > > This commit broke ARM bots, logs are available here: > > > http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/13576/steps/ninj

Re: [PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-21 Thread Yvan Roux via cfe-commits
Hi Richard, This commit broke ARM bots, logs are available here: http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/13576/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Atail-padding.cpp Thanks, Yvan On Thu, 20 Jun 2019 at 23:06, John McCall via Phabricator via llvm-commits wro

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D63451#1552609 , @rsmith wrote: > In D63451#1549563 , @rjmccall wrote: > > > Can this attribute not be applied to a base class, or to a type? > > > The standard attribute forbids that ri

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked an inline comment as done. rsmith added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:1850 +AggValueSlot::Overlap_t +CodeGenFunction::overlapForFieldInit(const FieldDecl *FD) { + if (!FD->hasAttr() || !FD->getType()->isRecordType()) rjmcca

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363976: P0840R2: support for [[no_unique_address]] attribute (authored by rsmith, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINC

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. Comment at: include/clang/Basic/Attr.td:326 + // const llvm::Triple &T = Target.getTriple(); + code CustomCode = [{}]; } Thanks! Comment at: lib/CodeGen/CGExprAgg.cpp:1850 +A

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D63451#1549563 , @rjmccall wrote: > Can this attribute not be applied to a base class, or to a type? The standard attribute forbids that right now. We could add a custom attribute that permits it, but we're required to diagnos

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 205892. rsmith marked 4 inline comments as done. rsmith added a comment. - Use custom code to specify CXXABI requirements on attributes. - Remove dead code that would have handled [[no_unique_address]] in C. - Extend documentation to include an example and to m

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:1850 +AggValueSlot::Overlap_t +CodeGenFunction::overlapForFieldInit(const FieldDecl *FD) { + if (!FD->hasAttr() || !FD->getType()->isRecordType()) rsmith wrote: > rjmccall wrote: > > `getOverlap

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. The attribute parts LGTM! You can change the `TargetItaniumCXXABI` part in a follow-up commit if you'd prefer. Comment at: lib/AST/Decl.cpp:3945 +retur

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Decl.cpp:3937 + // -- [has] virtual member functions or virtual base classes, or + // -- has subobjects of nonzero size or bit-fields of nonzero length + if (const auto *CXXRD = dyn_cast(RD)) { rsmith

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked 2 inline comments as done. rsmith added inline comments. Comment at: lib/AST/Decl.cpp:3937 + // -- [has] virtual member functions or virtual base classes, or + // -- has subobjects of nonzero size or bit-fields of nonzero length + if (const auto *CXXRD =

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Can this attribute not be applied to a base class, or to a type? I think every time I've seen someone get bitten by the unique-address rule, it was because they had a base class that deleted some constructors (or something like that) and which was a base of a million

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 205488. rsmith added a comment. - Remove accidentally-added file Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63451/new/ https://reviews.llvm.org/D63451 Files: include/clang/AST/Decl.h include/clang/AST/DeclCXX.h inclu

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/DeclCXX.h:337-341 /// true when this class is empty for traits purposes, -/// i.e. has no data members other than 0-width bit-fields, has no +/// i.e. has no data members other than 0-width bit-fields and em

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 205487. rsmith marked 5 inline comments as done. rsmith added a comment. Herald added a reviewer: jfb. Herald added subscribers: jfb, arphaman. - Address review comments from @AaronBallman. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Can you also add some SemaCXX tests that ensure the attribute is properly diagnosed when written on a bit-field, a static data member, a function, is given an argument, etc? Comment at: include/clan

[PATCH] D63451: P0840R2: support for [[no_unique_address]] attribute

2019-06-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added subscribers: aheejin, dschuff. Herald added a project: clang. Add support for the C++2a [[no_unique_address]] attribute for targets using the Itanium C++ ABI. This depends on D63371 .