[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-02-08 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. It looks great. Comment at: clang/lib/AST/ASTContext.cpp:2582-2584 +int64_t BitfieldSize = Field->getBitWidthValue(Context); +if (BitfieldSize > FieldSizeInBits) + return llvm::None; Why do you return `None` here? ==

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-02-08 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2582-2584 +int64_t BitfieldSize = Field->getBitWidthValue(Context); +if (BitfieldSize > FieldSizeInBits) + return llvm::None; steakhal wrote: > Why do you return `None` here? The

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-11-05 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze updated this revision to Diff 303082. gbencze added a comment. Herald added a subscriber: mgrang. Sorry for the slow update on this. I fixed the behavior when reusing tail padding as mentioned by @rsmith and took a shot at unifying the code paths for base classes and fields. Let me know

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-11-05 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added inline comments. Comment at: clang/test/SemaCXX/has_unique_object_reps_no_unique_addr.cpp:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify -std=c++2a %s +// expected-no-diagnostics Just to be sure: is the specifying the t

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-10-18 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze created this revision. gbencze added reviewers: rsmith, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. gbencze requested review of this revision. Fix incorrect behavior of __has_unique_object_representations when using the no_unique_address attribute

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-10-18 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This looks fine as far as it goes, but it doesn't fix all cases of incorrect behavior of `__has_unique_object_representations` due to `[[no_unique_address]]`. Feel free to either to land this

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-10-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2608 +continue; + else if (!Context.hasUniqueObjectRepresentations(Field->getType())) +return llvm::None; You can drop the `else` after this sorta-return if you'd l

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-10-19 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:2580-2581 if (!isStructEmpty(Base.getType())) { llvm::Optional Size = structHasUniqueObjectRepresentations( Context, Base.getType()->castAs()->getDecl()); if (!Size)

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2020-11-21 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added a comment. Pinging @rsmith - could you please check the updates to this patch? Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89649/new/ https://reviews.llvm.org/D89649 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-01-07 Thread Gabor Bencze via Phabricator via cfe-commits
gbencze added a comment. Ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89649/new/ https://reviews.llvm.org/D89649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. //Gentle boop.// Bugzilla is offline for me right now (and rumour has it that it will be completely shut down in the near future), so it would be good to know what is the status of this patch and how it related to the mentioned (and //right now// unavailable) bug rep

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Comment at: clang/lib/AST/ASTContext.cpp:2570-2571 +getSubobjectSizeInBits(const FieldDecl *Field, const ASTContext &Context) { + if (Field->getType()->isRecordType()) { +const RecordDecl *RD = Fiel

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-03-31 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added reviewers: erichkeane, rnk, majnemer, EricWF. steakhal added a comment. I'm adding a couple of reviewers to get this going. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89649/new/ https://reviews.llvm.org/D89649 ___ cfe-commit

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-04-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added subscribers: dblaikie, erik.pilkington, martong, whisperity. whisperity added a reviewer: shafik. whisperity added a comment. Adding a few subscribers I could find from the original bugzilla entry, + perhaps a few reviewers to help us. CHANGES SINCE LAST ACTION https://review

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-08-26 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGad59735f9d15: Fix __has_unique_object_representations with no_unique_address (authored by gbencze, committed by steakhal). Changed prior to commit: https://reviews.llvm.org/D89649?vs=303082&id=368823#to