File tree Expand file tree Collapse file tree 6 files changed +66
-1
lines changed Expand file tree Collapse file tree 6 files changed +66
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ Deprecations and Removals
123123 overload of ``allocate ``. However, this led to the library being non-conforming due to incorrect
124124 constexpr-ness.
125125
126+ - The macros ``_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES `` and
127+ ``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES `` have been deprecated and
128+ will be removed in LLVM 19. These macros used to re-enable all features
129+ that were removed in the C++17 and C++20 standards. Instead of using these
130+ macros, please use the macros to re-enable individual features.
131+
126132Upcoming Deprecations and Removals
127133----------------------------------
128134
@@ -149,6 +155,10 @@ LLVM 19
149155- The ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS `` macro has been deprecated in LLVM 18 and will be removed
150156 entirely in LLVM 19.
151157
158+ - The ``_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES `` and
159+ ``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES `` macros have been deprecated
160+ in LLVM 18 and will be removed entirely in LLVM 19.
161+
152162LLVM 20
153163~~~~~~~
154164
Original file line number Diff line number Diff line change @@ -275,6 +275,8 @@ C++17 Specific Configuration Macros
275275**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES **:
276276 This macro is used to re-enable all the features removed in C++17. The effect
277277 is equivalent to manually defining each macro listed below.
278+ This macro is deprecated and will be removed in LLVM-19. Use the
279+ individual macros listed below.
278280
279281**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR **:
280282 This macro is used to re-enable `auto_ptr `.
@@ -303,6 +305,8 @@ C++20 Specific Configuration Macros
303305**_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES **:
304306 This macro is used to re-enable all the features removed in C++20. The effect
305307 is equivalent to manually defining each macro listed below.
308+ This macro is deprecated and will be removed in LLVM-19. Use the
309+ individual macros listed below.
306310
307311**_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS **:
308312 This macro is used to re-enable redundant members of `allocator<T> `,
Original file line number Diff line number Diff line change 1616# pragma GCC system_header
1717#endif
1818
19+ #if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
20+ # pragma clang deprecated( \
21+ _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES, \
22+ " _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES is deprecated in LLVM 18 and will be removed in LLVM 19" )
23+ #endif
24+ #if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
25+ # pragma clang deprecated( \
26+ _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES, \
27+ " _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES is deprecated in LLVM 18 and will be removed in LLVM 19" )
28+ #endif
29+
1930#if defined(__apple_build_version__)
2031// Given AppleClang XX.Y.Z, _LIBCPP_APPLE_CLANG_VER is XXYZ (e.g. AppleClang 14.0.3 => 1403)
2132# define _LIBCPP_COMPILER_CLANG_BASED
Original file line number Diff line number Diff line change 99// Test that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES correctly defines
1010// _LIBCPP_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
1111
12- // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
12+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -Wno-deprecated-pragma
1313
1414#include < __config>
1515
Original file line number Diff line number Diff line change 1+ // ===----------------------------------------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ // <__config>
10+
11+ // Ensure that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES yields a
12+ // deprecation warning. We intend to issue a deprecation warning in LLVM 18
13+ // and remove the macro entirely in LLVM 19. As such, this test will be quite
14+ // short lived.
15+
16+ // UNSUPPORTED: clang-modules-build
17+
18+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
19+
20+ #include < __config> // expected-warning@* 1+ {{macro '_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES' has been marked as deprecated}}
Original file line number Diff line number Diff line change 1+ // ===----------------------------------------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ // <__config>
10+
11+ // Ensure that defining _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES yields a
12+ // deprecation warning. We intend to issue a deprecation warning in LLVM 18
13+ // and remove the macro entirely in LLVM 19. As such, this test will be quite
14+ // short lived.
15+
16+ // UNSUPPORTED: clang-modules-build
17+
18+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
19+
20+ #include < version> // expected-warning@* 1+ {{macro '_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES' has been marked as deprecated}}
You can’t perform that action at this time.
0 commit comments