[libcxx-commits] [PATCH] D119430: [libcxx] Wrap [[no_unique_address]] in a macro, for clang-cl

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 10 05:27:47 PST 2022


philnik accepted this revision as: philnik.
philnik added a comment.

LGTM % comments



================
Comment at: libcxx/include/__config:1404
+   // If/when MSVC breaks its C++ ABI, it will be changed to work as intended.
+   // Clang-cl does not yet (14.0) implement no_unique_address at all, so
+   // any use of this attribute triggers a warning (and doesn't give the
----------------



================
Comment at: libcxx/include/__config:1411
+   // [[no_unique_address]] is supposed to do, in general.
+   // Clang-cl does not yet (14.0) implement msvc::no_unique_address though.
+#  define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
----------------



================
Comment at: libcxx/include/__ranges/join_view.h:71
+    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cache_;
+    _View __base_ = _View(); // TODO: _LIBCPP_NO_UNIQUE_ADDRESS makes clang crash! File a bug :)
 
----------------
I'd personally keep `[[no_unique_address]]` here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119430



More information about the libcxx-commits mailing list