diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -3718,7 +3718,6 @@ // is_literal_type; #if _LIBCPP_STD_VER <= 17 - template struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant {}; @@ -3728,7 +3727,6 @@ _LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_literal_type_v = is_literal_type<_Tp>::value; #endif - #endif // is_standard_layout; diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp @@ -13,8 +13,7 @@ // constexpr atomic::atomic(T value) -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include #include diff --git a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp b/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp --- a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp @@ -12,8 +12,7 @@ // [Note any is a not a literal type --end note] -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include #include diff --git a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.fail.cpp copy from libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp copy to libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.fail.cpp --- a/libcxx/test/std/utilities/any/any.class/not_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.fail.cpp @@ -8,20 +8,16 @@ // REQUIRES: c++17 -// +// type_traits -// [Note any is a not a literal type --end note] +// is_literal_type -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - -#include #include #include "test_macros.h" int main(int, char**) { - static_assert(!std::is_literal_type::value, ""); - - return 0; + static_assert(std::is_literal_type::value, ""); // expected-warning {{'is_literal_type' is deprecated}} + static_assert(std::is_literal_type::value, + ""); // expected-warning {{'is_literal_type' is deprecated}} } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp @@ -12,8 +12,7 @@ // is_literal_type -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include #include // for std::nullptr_t diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.removed.verify.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.removed.verify.cpp --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.removed.verify.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.removed.verify.cpp @@ -6,15 +6,12 @@ // //===----------------------------------------------------------------------===// -// REQUIRES: c++20 +// UNSUPPORTED: c++03, c++11, c++14, c++17 // type_traits // is_literal_type -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - #include using std::is_literal_type; // expected-error {{no member named 'is_literal_type' in namespace 'std'}} diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.dtor/dtor.pass.cpp @@ -11,8 +11,7 @@ // ~optional(); -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS #include #include