[libcxx-commits] [libcxx] 8f0b2ac - [libc++] Use _LIBCPP_NO_UNIQUE_ADDRESS for base in join_view
Joe Loser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 11 15:39:49 PST 2022
Author: Joe Loser
Date: 2022-02-11T18:37:32-05:00
New Revision: 8f0b2ac140c36f37597deef66bea8a7739c18a7b
URL: https://github.com/llvm/llvm-project/commit/8f0b2ac140c36f37597deef66bea8a7739c18a7b
DIFF: https://github.com/llvm/llvm-project/commit/8f0b2ac140c36f37597deef66bea8a7739c18a7b.diff
LOG: [libc++] Use _LIBCPP_NO_UNIQUE_ADDRESS for base in join_view
Despite the comment saying `[[no_unique_address]]` on the `__base_` data member
makes clang crash, this does not seem to be true on CI. So, mark `__base_` with
`_LIBCPP_NO_UNIQUE_ADDRESS`.
Differential Revision: https://reviews.llvm.org/D119208
Added:
Modified:
libcxx/include/__ranges/join_view.h
Removed:
################################################################################
diff --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h
index 1af22213369a..4bab8dfeec43 100644
--- a/libcxx/include/__ranges/join_view.h
+++ b/libcxx/include/__ranges/join_view.h
@@ -68,7 +68,7 @@ namespace ranges {
static constexpr bool _UseCache = !is_reference_v<_InnerRange>;
using _Cache = _If<_UseCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
_LIBCPP_NO_UNIQUE_ADDRESS _Cache __cache_;
- _View __base_ = _View(); // TODO: [[no_unique_address]] makes clang crash! File a bug :)
+ _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
public:
_LIBCPP_HIDE_FROM_ABI
More information about the libcxx-commits
mailing list