[libcxx-commits] [libcxx] 28e399f - [libc++][PMR] Deprecate the implementation in std::experimental
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 31 16:37:22 PDT 2022
Author: Nikolas Klauser
Date: 2022-11-01T00:37:08+01:00
New Revision: 28e399fa1ec876ea1052db30de570a21ab18d9fb
URL: https://github.com/llvm/llvm-project/commit/28e399fa1ec876ea1052db30de570a21ab18d9fb
DIFF: https://github.com/llvm/llvm-project/commit/28e399fa1ec876ea1052db30de570a21ab18d9fb.diff
LOG: [libc++][PMR] Deprecate the implementation in std::experimental
This commit deprecates <experimental/memory_resource> since we now ship the non-experimental
version of it. Per the libc++ policy [1], we are deprecating the experimental feature in
upcoming LLVM 16 and will remove it entirely in LLVM 18.
[1]: https://libcxx.llvm.org/DesignDocs/ExperimentalFeatures.html#id4
Reviewed By: ldionne, #libc
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D136245
Added:
Modified:
libcxx/docs/ReleaseNotes.rst
libcxx/include/experimental/memory_resource
libcxx/include/experimental/regex
libcxx/include/experimental/string
libcxx/src/experimental/memory_resource.cpp
libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp
libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp
libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/private_members.fail.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp
libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index 89029d614e3ca..d10fdde8d719f 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -92,6 +92,10 @@ Deprecations and Removals
- The ``_LIBCPP_ENABLE_CXX03_FUNCTION`` macro that allowed re-enabling the now-deprecated C++03 implementation of
``std::function`` has been removed. Users who need to use ``std::function`` should switch to C++11 and above.
+- The contents of ``<experimental/memory_resource>`` are now deprecated since libc++ ships ``<memory_resource>`` now.
+ Please migrate to ``<memory_resource>`` instead. Per libc++'s TS deprecation policy,
+ ``<experimental/memory_resource>`` will be removed in LLVM 18.
+
Upcoming Deprecations and Removals
----------------------------------
diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource
index 1b5fd39b3a562..f107f109203f0 100644
--- a/libcxx/include/experimental/memory_resource
+++ b/libcxx/include/experimental/memory_resource
@@ -86,6 +86,10 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+#define _LIBCPP_DEPCREATED_MEMORY_RESOURCE(name) \
+ _LIBCPP_DEPRECATED_("'std::experimental::pmr::" name \
+ "' is deprecated and will be removed in LLVM 18. Use 'std::pmr::" name "' instead.")
+
#ifndef _LIBCPP_CXX03_LANG
// Round __s up to next multiple of __a.
@@ -97,7 +101,7 @@ size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT
}
// 8.5, memory.resource
-class _LIBCPP_TYPE_VIS memory_resource
+class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("memory_resource") _LIBCPP_TYPE_VIS memory_resource
{
static const size_t __max_align = _LIBCPP_ALIGNOF(max_align_t);
@@ -125,37 +129,37 @@ private:
};
// 8.5.4, memory.resource.eq
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("operator==(memory_resource, memory_resource)") inline _LIBCPP_INLINE_VISIBILITY
bool operator==(memory_resource const & __lhs,
memory_resource const & __rhs) _NOEXCEPT
{
return &__lhs == &__rhs || __lhs.is_equal(__rhs);
}
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("operator!=(memory_resource, memory_resource)") inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(memory_resource const & __lhs,
memory_resource const & __rhs) _NOEXCEPT
{
return !(__lhs == __rhs);
}
-_LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("new_delete_resource()") _LIBCPP_FUNC_VIS
memory_resource * new_delete_resource() _NOEXCEPT;
-_LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("null_memory_resource()") _LIBCPP_FUNC_VIS
memory_resource * null_memory_resource() _NOEXCEPT;
-_LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("get_default_resource()") _LIBCPP_FUNC_VIS
memory_resource * get_default_resource() _NOEXCEPT;
-_LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("set_default_resource()") _LIBCPP_FUNC_VIS
memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT;
// 8.6, memory.polymorphic.allocator.class
// 8.6.1, memory.polymorphic.allocator.overview
template <class _ValueType>
-class _LIBCPP_TEMPLATE_VIS polymorphic_allocator
+class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("polymorphic_allocator") _LIBCPP_TEMPLATE_VIS polymorphic_allocator
{
public:
typedef _ValueType value_type;
@@ -316,6 +320,7 @@ private:
// 8.6.4, memory.polymorphic.allocator.eq
template <class _Tp, class _Up>
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("operator==(const polymorphic_allocator&, const polymorphic_allocator&)")
inline _LIBCPP_INLINE_VISIBILITY
bool operator==(polymorphic_allocator<_Tp> const & __lhs,
polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT
@@ -324,6 +329,7 @@ bool operator==(polymorphic_allocator<_Tp> const & __lhs,
}
template <class _Tp, class _Up>
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("operator!=(const polymorphic_allocator&, const polymorphic_allocator&)")
inline _LIBCPP_INLINE_VISIBILITY
bool operator!=(polymorphic_allocator<_Tp> const & __lhs,
polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT
@@ -333,6 +339,7 @@ bool operator!=(polymorphic_allocator<_Tp> const & __lhs,
// 8.7, memory.resource.adaptor
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
// 8.7.1, memory.resource.adaptor.overview
template <class _CharAlloc>
class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp
@@ -413,6 +420,7 @@ template <class _Alloc>
using resource_adaptor = __resource_adaptor_imp<
typename allocator_traits<_Alloc>::template rebind_alloc<char>
>;
+_LIBCPP_SUPPRESS_DEPRECATED_POP
#endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/experimental/regex b/libcxx/include/experimental/regex
index 8aa880cd80b0c..0c871f366dc89 100644
--- a/libcxx/include/experimental/regex
+++ b/libcxx/include/experimental/regex
@@ -55,11 +55,11 @@ using match_results =
_VSTD::match_results<_BiDirIter,
polymorphic_allocator<_VSTD::sub_match<_BiDirIter>>>;
-typedef match_results<const char*> cmatch;
-typedef match_results<_VSTD_LFTS_PMR::string::const_iterator> smatch;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("cmatch") typedef match_results<const char*> cmatch;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("smatch") typedef match_results<_VSTD_LFTS_PMR::string::const_iterator> smatch;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef match_results<const wchar_t*> wcmatch;
-typedef match_results<_VSTD_LFTS_PMR::wstring::const_iterator> wsmatch;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("wcmatch") typedef match_results<const wchar_t*> wcmatch;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("wsmatch") typedef match_results<_VSTD_LFTS_PMR::wstring::const_iterator> wsmatch;
#endif
#endif // _LIBCPP_CXX03_LANG
diff --git a/libcxx/include/experimental/string b/libcxx/include/experimental/string
index c6a3e98d135d2..4edbf98b5f73b 100644
--- a/libcxx/include/experimental/string
+++ b/libcxx/include/experimental/string
@@ -51,17 +51,21 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
#ifndef _LIBCPP_CXX03_LANG
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+
template <class _CharT, class _Traits = char_traits<_CharT>>
using basic_string =
_VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
-typedef basic_string<char> string;
-typedef basic_string<char16_t> u16string;
-typedef basic_string<char32_t> u32string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("string") typedef basic_string<char> string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("u16string") typedef basic_string<char16_t> u16string;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("u32string") typedef basic_string<char32_t> u32string;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-typedef basic_string<wchar_t> wstring;
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("wstring") typedef basic_string<wchar_t> wstring;
#endif
+_LIBCPP_SUPPRESS_DEPRECATED_POP
+
#endif // _LIBCPP_CXX03_LANG
_LIBCPP_END_NAMESPACE_LFTS_PMR
diff --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp
index 58e36fee05c3a..d6bb52ec174d2 100644
--- a/libcxx/src/experimental/memory_resource.cpp
+++ b/libcxx/src/experimental/memory_resource.cpp
@@ -8,6 +8,8 @@
#include <experimental/memory_resource>
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+
#ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER
# include <atomic>
#elif !defined(_LIBCPP_HAS_NO_THREADS)
diff --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
index 396cab36eb430..5c717f8d87847 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
@@ -17,6 +17,8 @@
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
index 332473a30a4ec..728762cf0faab 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
@@ -11,6 +11,8 @@
// test_memory_resource requires RTTI for dynamic_cast
// UNSUPPORTED: no-rtti
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
// <experimental/memory_resource>
// template <class T> class polymorphic_allocator
diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
index 7c8942840f080..53050428cefd7 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
@@ -17,6 +17,8 @@
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp
index 876aa2dad1497..b6945bbeb9edf 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.global/global_memory_resource_lifetime.pass.cpp
@@ -22,6 +22,8 @@
// attempts to use 'new_delete_resource()' very late in program termination
// to detect lifetime issues.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp
index 04748c3b58953..c59ac64870764 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.global/new_delete_resource_lifetime.pass.cpp
@@ -22,6 +22,8 @@
// attempts to use 'new_delete_resource()' very late in program termination
// to detect lifetime issues.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp
index b437ead67a10f..e966632ef4efe 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/assign.pass.cpp
@@ -14,6 +14,8 @@
// polymorphic_allocator operator=(polymorphic_allocator const &) = delete
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp
index 8bb272780bf45..4fb34b8e69c6a 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/copy.pass.cpp
@@ -14,6 +14,8 @@
// polymorphic_allocator<T>::polymorphic_allocator(polymorphic_allocator const &);
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp
index 26d6e437fdfdf..b4faa68326298 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/default.pass.cpp
@@ -22,6 +22,8 @@
// polymorphic_allocator<T>::polymorphic_allocator() noexcept
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp
index 4b25b7503b3d1..e72b49615b496 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/memory_resource_convert.pass.cpp
@@ -17,6 +17,8 @@
// polymorphic_allocator<T>::polymorphic_allocator(memory_resource *)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp
index b084ec8872cee..b56e479719602 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.ctor/other_alloc.pass.cpp
@@ -15,6 +15,7 @@
// template <class U>
// polymorphic_allocator<T>::polymorphic_allocator(polymorphic_allocator<U> const &);
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp
index c0ef9cdecea67..f198c527ee43c 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/equal.pass.cpp
@@ -25,6 +25,8 @@
// polymorphic_allocator<T> const &
// , polymorphic_allocator<U> const &) noexcept
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp
index db693a768c531..14d53e4200338 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.eq/not_equal.pass.cpp
@@ -25,6 +25,8 @@
// polymorphic_allocator<T> const &
// , polymorphic_allocator<T> const &) noexcept
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp
index cd7d445ee25f2..a33989e0d98d9 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/allocate.pass.cpp
@@ -22,6 +22,8 @@
// T* polymorphic_allocator<T>::allocate(size_t n)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <limits>
#include <memory>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp
index 6fc77f58428b8..9d653a6d00ebb 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair.pass.cpp
@@ -20,6 +20,8 @@
// template <class U1, class U2>
// void polymorphic_allocator<T>::construct(pair<U1, U2>*)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <utility>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp
index b025da317d382..dbfddf503e34c 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_const_lvalue_pair.pass.cpp
@@ -23,6 +23,8 @@
// template <class P1, class P2, class U1, class U2>
// void polymorphic_allocator<T>::construct(pair<P1, P2>*, pair<U1, U2> const&)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <utility>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp
index c80d93fac8296..0d90844ff6362 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_rvalue.pass.cpp
@@ -23,6 +23,8 @@
// template <class P1, class P2, class U1, class U2>
// void polymorphic_allocator<T>::construct(pair<P1, P2>*, pair<U1, U2> &&)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <utility>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp
index 3f67a5d2d21fb..6641c93609c67 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_pair_values.pass.cpp
@@ -23,6 +23,8 @@
// template <class P1, class P2, class U1, class U2>
// void polymorphic_allocator<T>::construct(pair<P1, P2>*, U1&&, U2&&)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <utility>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
index e5186048d3ebc..0a5b250721e23 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp
@@ -24,6 +24,8 @@
// void polymorphic_allocator<T>::construct(pair<U1, U2>*, piecewise_construct_t
// tuple<Args1...>, tuple<Args2...>)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <utility>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp
index 5f71e4b5eb650..af30ef0f2937e 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair_evil.pass.cpp
@@ -21,6 +21,8 @@
// void polymorphic_allocator<T>::construct(pair<U1, U2>*, piecewise_construct_t
// tuple<Args1...>, tuple<Args2...>)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <tuple>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
index 62b77ff8a4d5c..08716b322e074 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp
@@ -23,6 +23,8 @@
// template <class U, class ...Args>
// void polymorphic_allocator<T>::construct(U *, Args &&...)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp
index 5fb85b623b01b..ec6059de39ada 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/deallocate.pass.cpp
@@ -22,6 +22,8 @@
// T* polymorphic_allocator<T>::deallocate(T*, size_t size)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp
index 58550fe530688..039a1c7fb2cd3 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp
@@ -20,6 +20,8 @@
// template <class U>
// void polymorphic_allocator<T>::destroy(U * ptr);
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <new>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp
index 1a8146ce0ca48..99595730a35ed 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/resource.pass.cpp
@@ -20,6 +20,8 @@
// memory_resource *
// polymorphic_allocator<T>::resource() const
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp
index 7ab203401dc43..be8673f88b1e6 100644
--- a/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp
@@ -20,6 +20,8 @@
// polymorphic_allocator
// polymorphic_allocator<T>::select_on_container_copy_construction() const
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp
index 29e2322023702..0f43709cb5d71 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_copy.pass.cpp
@@ -17,6 +17,8 @@
// resource_adaptor_imp<Alloc>::resource_adaptor_imp(Alloc const &)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp
index d62f868d7b995..1be7f3f30bde0 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/alloc_move.pass.cpp
@@ -17,6 +17,8 @@
// resource_adaptor_imp<Alloc>::resource_adaptor_imp(Alloc &&)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp
index f624ae68ca629..c26a477820f6f 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.ctor/default.pass.cpp
@@ -17,6 +17,8 @@
// resource_adaptor_imp<Alloc>::resource_adaptor_imp() = default;
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <memory>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp
index 8b61bd6c06c50..f9ebeffe7a605 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_allocate_and_deallocate.pass.cpp
@@ -18,6 +18,8 @@
// void * do_allocate(size_t size, size_t align)
// void do_deallocate(void*, size_t, size_t)
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <memory>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp
index 7c6b2c460a9d0..83777f75cb171 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/do_is_equal.pass.cpp
@@ -17,6 +17,8 @@
// bool do_is_equal(memory_resource const &) const noexcept;
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <memory>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp
index 1156cb02e432a..59588247655a4 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.overview/overview.pass.cpp
@@ -15,6 +15,8 @@
// template <class Alloc> class resource_adaptor_imp;
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <memory>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp
index 21e3d01d58629..03fde4da10031 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_deque_synop.pass.cpp
@@ -22,6 +22,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/deque>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp
index 7925f1058c63e..614b8c470c4ec 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_forward_list_synop.pass.cpp
@@ -22,6 +22,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/forward_list>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp
index d33d132cd8049..c786a4e5a85b9 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_list_synop.pass.cpp
@@ -22,6 +22,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/list>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp
index 5ab24e794fb1e..0671cc7f29629 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_map_synop.pass.cpp
@@ -26,6 +26,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/map>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp
index 8079840a46bb1..397cb263f1fa2 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_regex_synop.pass.cpp
@@ -30,6 +30,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/regex>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp
index 7539b53184b00..ee7512503453f 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_set_synop.pass.cpp
@@ -26,6 +26,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/set>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp
index ee141039c4516..d8acb0587c806 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_string_synop.pass.cpp
@@ -27,6 +27,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/string>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp
index 775ebcc082293..c1068291589e2 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_map_synop.pass.cpp
@@ -26,6 +26,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/unordered_map>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp
index 7ef0d6f03f28b..7cdf1ea0a511e 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_unordered_set_synop.pass.cpp
@@ -26,6 +26,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/unordered_set>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp
index 8f76c2397477a..0a503bc436d78 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.aliases/header_vector_synop.pass.cpp
@@ -22,6 +22,8 @@
//
// }}} // namespace std::experimental::pmr
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/vector>
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp
index d6e1f23c476ae..12d1124878b16 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.global/default_resource.pass.cpp
@@ -18,6 +18,8 @@
// <experimental/memory_resource>
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
//-----------------------------------------------------------------------------
// TESTING memory_resource * get_default_resource() noexcept;
// memory_resource * set_default_resource(memory_resource*) noexcept;
diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
index d904d5a14558b..44b00cbb47a2a 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.global/new_delete_resource.pass.cpp
@@ -17,6 +17,8 @@
// memory_resource * new_delete_resource()
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
index a08e4f93f0816..8ac9b8bfe6979 100644
--- a/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource.global/null_memory_resource.pass.cpp
@@ -17,6 +17,8 @@
// memory_resource * null_memory_resource()
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <new>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp b/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp
index b0776ec9cf588..2a6a927b9d516 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/construct.fail.cpp
@@ -12,6 +12,8 @@
// Check that memory_resource is not constructible
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp
index d3e086baad564..0b007eef73aa6 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/equal.pass.cpp
@@ -15,6 +15,8 @@
// bool operator==(memory_resource const &, memory_resource const &) noexcept;
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp
index 08a44702c8b5e..182b335e50514 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.eq/not_equal.pass.cpp
@@ -15,6 +15,8 @@
// bool operator!=(memory_resource const &, memory_resource const &) noexcept;
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/private_members.fail.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/private_members.fail.cpp
index a0c84b0fa83cc..0a0353861fb01 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/private_members.fail.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.priv/private_members.fail.cpp
@@ -14,6 +14,8 @@
// memory_resource::do_deallocate(void*, size_t, size_t); /* private */
// memory_resource::do_is_equal(memory_resource const&); /* private */
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
namespace ex = std::experimental::pmr;
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp
index b5f31daefb7f9..f09c820e1e1d1 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/allocate.pass.cpp
@@ -24,6 +24,8 @@
// D) Invoking 'allocate' invokes 'do_allocate' with the same arguments.
// E) If 'do_allocate' throws then 'allocate' propagates that exception.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cstddef>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp
index f1851890d0777..f23db0f9c4bed 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/deallocate.pass.cpp
@@ -23,6 +23,7 @@
// C) 'deallocate' is not marked as 'noexcept'.
// D) Invoking 'deallocate' invokes 'do_deallocate' with the same arguments.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
#include <experimental/memory_resource>
#include <type_traits>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp
index ae4e182027fa9..51bcd228dabe4 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/dtor.pass.cpp
@@ -21,6 +21,8 @@
// B) The destructor is implicitly marked noexcept.
// C) The destructor is marked virtual.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
diff --git a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp
index 1e2783b78a841..ab636f73f7a28 100644
--- a/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.resource/memory.resource.public/is_equal.pass.cpp
@@ -24,6 +24,8 @@
// and the resulting value is returned.
// D) 'do_is_equal' is called on the LHS object and not the RHS object.
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
#include <experimental/memory_resource>
#include <type_traits>
#include <cassert>
More information about the libcxx-commits
mailing list