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?
==
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
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
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
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
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
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
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)
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.
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
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
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
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
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
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
15 matches
Mail list logo