NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

This looks correct, thanks!

I think there are some weird rules with respect to `[[no_unique_address]]` on 
two consecutive fields when there's only one other field in the structure, eg.

  struct S {
      char c;
      [[no_unique_address]] Empty e1, e2;
  };

will have a size of two bytes according to 
https://en.cppreference.com/w/cpp/language/attributes/no_unique_address.

It's probably worth a test case to see if we still calculate padding correctly 
in such cases but I don't insist.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104097/new/

https://reviews.llvm.org/D104097

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to