[PATCH] D110485: Support [[no_unique_address]] for all targets.

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 9 12:45:38 PST 2022


mstorsjo added a comment.

To pick up the thread here again, `[[no_unique_address]]` is done and settled in MSVC, with the slightly surprising semantics: `[[no_unique_address]]` is accepted, without any warning (in C++20 mode), but it has no effect. (This, not related to LLVM, but because they had shipped it in earlier versions without having an effect, and changing that later would break things.) `[[msvc::no_unique_address]]` does have an effect though. See https://github.com/microsoft/STL/issues/1364#issuecomment-1034167093 for a more authoritative source on that.

So, separately from implementing `[[msvc::no_unique_address]]`, I think we also should also silence the current warning about unknown attribute for the standard `[[no_unique_address]]`, to match MSVC.


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

https://reviews.llvm.org/D110485



More information about the cfe-commits mailing list