File tree 6 files changed +66
-1
lines changed
6 files changed +66
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ Deprecations and Removals
123
123
overload of ``allocate ``. However, this led to the library being non-conforming due to incorrect
124
124
constexpr-ness.
125
125
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 enable all features
129
+ removed in C++17 and C++20. Instead of using these macros, use the
130
+ macros to enable the individual features.
131
+
126
132
Upcoming Deprecations and Removals
127
133
----------------------------------
128
134
@@ -149,6 +155,10 @@ LLVM 19
149
155
- The ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS `` macro has been deprecated in LLVM 18 and will be removed
150
156
entirely in LLVM 19.
151
157
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
+
152
162
LLVM 20
153
163
~~~~~~~
154
164
Original file line number Diff line number Diff line change @@ -275,6 +275,8 @@ C++17 Specific Configuration Macros
275
275
**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES **:
276
276
This macro is used to re-enable all the features removed in C++17. The effect
277
277
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.
278
280
279
281
**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR **:
280
282
This macro is used to re-enable `auto_ptr `.
@@ -303,6 +305,8 @@ C++20 Specific Configuration Macros
303
305
**_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES **:
304
306
This macro is used to re-enable all the features removed in C++20. The effect
305
307
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.
306
310
307
311
**_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS **:
308
312
This macro is used to re-enable redundant members of `allocator<T> `,
Original file line number Diff line number Diff line change 16
16
# pragma GCC system_header
17
17
#endif
18
18
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
+
19
30
#if defined(__apple_build_version__)
20
31
// Given AppleClang XX.Y.Z, _LIBCPP_APPLE_CLANG_VER is XXYZ (e.g. AppleClang 14.0.3 => 1403)
21
32
# define _LIBCPP_COMPILER_CLANG_BASED
Original file line number Diff line number Diff line change 9
9
// Test that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES correctly defines
10
10
// _LIBCPP_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
11
11
12
- // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
12
+ // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -Wno-deprecated-pragma
13
13
14
14
#include < __config>
15
15
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