[clang] [clang] Implement CWG2759 "`[[no_unique_address]` and common initial sequence" (PR #82607)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 22 02:41:12 PST 2024


cor3ntin wrote:

> No special handling of [[msvc::no_unique_address]] is performed, so it should follow [[no_unique_address]] behavior.

I do not think the code does that.
And we should test what it does.

At the very least, a type with msvc::no_unique_address should not be layout compatible with an equivalent declaration using no_unique_address.

Whether two msvc::no_unique_address are layout compatible is less important, because the intent of msvc::no_unique_address is not documented and/or msvc does not implement CWG2759

https://github.com/llvm/llvm-project/pull/82607


More information about the cfe-commits mailing list