From: Arthur O'Dwyer Date: Mon, 8 Nov 2021 22:00:43 +0000 (-0500) Subject: [libc++] [test] Eliminate libcpp-no-noexcept-function-type and libcpp-no-structured... X-Git-Tag: upstream/15.0.7~25157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=401b76fdf2b328520cc71d829ea726b74bb2192f;p=platform%2Fupstream%2Fllvm.git [libc++] [test] Eliminate libcpp-no-noexcept-function-type and libcpp-no-structured-bindings. At this point, every supported compiler that claims a -std=c++17 mode should also support these features. Differential Revision: https://reviews.llvm.org/D113436 --- diff --git a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp index 026da4e..63ecc20 100644 --- a/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp @@ -54,30 +54,16 @@ constexpr bool throws_invocable_r() { !std::is_nothrow_invocable_r::value; } -// FIXME(EricWF) Don't test the where noexcept is *not* part of the type system -// once implementations have caught up. void test_noexcept_function_pointers() { struct Dummy { void foo() noexcept {} static void bar() noexcept {} }; -#if !defined(__cpp_noexcept_function_type) - { - // Check that PMF's and function pointers *work*. is_nothrow_invocable will always - // return false because 'noexcept' is not part of the function type. - static_assert(throws_invocable(), ""); - static_assert(throws_invocable(), ""); - } -#else - { - // Check that PMF's and function pointers actually work and that - // is_nothrow_invocable returns true for noexcept PMF's and function - // pointers. - static_assert( - std::is_nothrow_invocable::value, ""); - static_assert(std::is_nothrow_invocable::value, ""); - } -#endif + // Check that PMF's and function pointers actually work and that + // is_nothrow_invocable returns true for noexcept PMF's and function + // pointers. + static_assert(std::is_nothrow_invocable::value, ""); + static_assert(std::is_nothrow_invocable::value, ""); } int main(int, char**) { diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp index 1dd5c72..eb87e0b 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp @@ -15,7 +15,6 @@ // : public integral_constant { }; // UNSUPPORTED: c++03, c++11, c++14 -// UNSUPPORTED: libcpp-no-structured-bindings #include #include diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py index cc2f5da..26ee17e 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -36,13 +36,11 @@ DEFAULT_FEATURES = [ Feature(name='-fsized-deallocation', when=lambda cfg: hasCompileFlag(cfg, '-fsized-deallocation')), Feature(name='-faligned-allocation', when=lambda cfg: hasCompileFlag(cfg, '-faligned-allocation')), Feature(name='fdelayed-template-parsing', when=lambda cfg: hasCompileFlag(cfg, '-fdelayed-template-parsing')), - Feature(name='libcpp-no-structured-bindings', when=lambda cfg: '__cpp_structured_bindings' not in featureTestMacros(cfg)), Feature(name='libcpp-no-concepts', when=lambda cfg: featureTestMacros(cfg).get('__cpp_concepts', 0) < 201907), Feature(name='libcpp-no-coroutines', when=lambda cfg: featureTestMacros(cfg).get('__cpp_impl_coroutine', 0) < 201902), Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms. Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')), - Feature(name='no-noexcept-function-type', when=lambda cfg: featureTestMacros(cfg).get('__cpp_noexcept_function_type', 0) < 201510), Feature(name='non-lockfree-atomics', when=lambda cfg: sourceBuilds(cfg, """ diff --git a/libcxxabi/test/catch_function_03.pass.cpp b/libcxxabi/test/catch_function_03.pass.cpp index a7832f1..7b7925a 100644 --- a/libcxxabi/test/catch_function_03.pass.cpp +++ b/libcxxabi/test/catch_function_03.pass.cpp @@ -7,7 +7,8 @@ //===----------------------------------------------------------------------===// // Can a noexcept function pointer be caught by a non-noexcept catch clause? -// UNSUPPORTED: no-exceptions, no-noexcept-function-type +// UNSUPPORTED: c++03, c++11, c++14 +// UNSUPPORTED: no-exceptions // Support for catching a function pointer including noexcept was shipped in macOS 10.13 // XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}} diff --git a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp index 3413753..ee81b0c 100644 --- a/libcxxabi/test/catch_member_function_pointer_02.pass.cpp +++ b/libcxxabi/test/catch_member_function_pointer_02.pass.cpp @@ -7,7 +7,8 @@ //===----------------------------------------------------------------------===// // Can a noexcept member function pointer be caught by a non-noexcept catch clause? -// UNSUPPORTED: no-exceptions, no-noexcept-function-type +// UNSUPPORTED: c++03, c++11, c++14 +// UNSUPPORTED: no-exceptions // Support for catching a function pointer including noexcept was shipped in macOS 10.13 // XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}