[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 24 05:34:43 PDT 2021
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 = Field->getType()->getAsRecordDecl();
+ if (!RD->isUnion())
----------------
================
Comment at: clang/test/SemaCXX/has_unique_object_reps_no_unique_addr.cpp:42
+} // namespace TailPaddingReuse
+static_assert(__has_unique_object_representations(TailPaddingReuse::B));
----------------
gbencze wrote:
> steakhal wrote:
> > Why is this outside of the namespace declaration?
> Tbh I'm not sure. I can move it in the namespace if you think it'd be better there.
No reason not to.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89649/new/
https://reviews.llvm.org/D89649
More information about the cfe-commits
mailing list