Skip to content

Commit 401b76f

Browse files
committed
[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
1 parent ec7b0d4 commit 401b76f

File tree

5 files changed

+9
-24
lines changed

5 files changed

+9
-24
lines changed

libcxx/test/std/utilities/meta/meta.rel/is_nothrow_invocable.pass.cpp

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,16 @@ constexpr bool throws_invocable_r() {
5454
!std::is_nothrow_invocable_r<Ret, Fn, Args...>::value;
5555
}
5656

57-
// FIXME(EricWF) Don't test the where noexcept is *not* part of the type system
58-
// once implementations have caught up.
5957
void test_noexcept_function_pointers() {
6058
struct Dummy {
6159
void foo() noexcept {}
6260
static void bar() noexcept {}
6361
};
64-
#if !defined(__cpp_noexcept_function_type)
65-
{
66-
// Check that PMF's and function pointers *work*. is_nothrow_invocable will always
67-
// return false because 'noexcept' is not part of the function type.
68-
static_assert(throws_invocable<decltype(&Dummy::foo), Dummy&>(), "");
69-
static_assert(throws_invocable<decltype(&Dummy::bar)>(), "");
70-
}
71-
#else
72-
{
73-
// Check that PMF's and function pointers actually work and that
74-
// is_nothrow_invocable returns true for noexcept PMF's and function
75-
// pointers.
76-
static_assert(
77-
std::is_nothrow_invocable<decltype(&Dummy::foo), Dummy&>::value, "");
78-
static_assert(std::is_nothrow_invocable<decltype(&Dummy::bar)>::value, "");
79-
}
80-
#endif
62+
// Check that PMF's and function pointers actually work and that
63+
// is_nothrow_invocable returns true for noexcept PMF's and function
64+
// pointers.
65+
static_assert(std::is_nothrow_invocable<decltype(&Dummy::foo), Dummy&>::value, "");
66+
static_assert(std::is_nothrow_invocable<decltype(&Dummy::bar)>::value, "");
8167
}
8268

8369
int main(int, char**) {

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// : public integral_constant<size_t, sizeof...(Types)> { };
1616

1717
// UNSUPPORTED: c++03, c++11, c++14
18-
// UNSUPPORTED: libcpp-no-structured-bindings
1918

2019
#include <tuple>
2120
#include <array>

libcxx/utils/libcxx/test/features.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@
3636
Feature(name='-fsized-deallocation', when=lambda cfg: hasCompileFlag(cfg, '-fsized-deallocation')),
3737
Feature(name='-faligned-allocation', when=lambda cfg: hasCompileFlag(cfg, '-faligned-allocation')),
3838
Feature(name='fdelayed-template-parsing', when=lambda cfg: hasCompileFlag(cfg, '-fdelayed-template-parsing')),
39-
Feature(name='libcpp-no-structured-bindings', when=lambda cfg: '__cpp_structured_bindings' not in featureTestMacros(cfg)),
4039
Feature(name='libcpp-no-concepts', when=lambda cfg: featureTestMacros(cfg).get('__cpp_concepts', 0) < 201907),
4140
Feature(name='libcpp-no-coroutines', when=lambda cfg: featureTestMacros(cfg).get('__cpp_impl_coroutine', 0) < 201902),
4241
Feature(name='has-fobjc-arc', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
4342
sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
4443
Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
45-
Feature(name='no-noexcept-function-type', when=lambda cfg: featureTestMacros(cfg).get('__cpp_noexcept_function_type', 0) < 201510),
4644

4745
Feature(name='non-lockfree-atomics',
4846
when=lambda cfg: sourceBuilds(cfg, """

libcxxabi/test/catch_function_03.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//===----------------------------------------------------------------------===//
88

99
// Can a noexcept function pointer be caught by a non-noexcept catch clause?
10-
// UNSUPPORTED: no-exceptions, no-noexcept-function-type
10+
// UNSUPPORTED: c++03, c++11, c++14
11+
// UNSUPPORTED: no-exceptions
1112

1213
// Support for catching a function pointer including noexcept was shipped in macOS 10.13
1314
// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}

libcxxabi/test/catch_member_function_pointer_02.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
//===----------------------------------------------------------------------===//
88

99
// Can a noexcept member function pointer be caught by a non-noexcept catch clause?
10-
// UNSUPPORTED: no-exceptions, no-noexcept-function-type
10+
// UNSUPPORTED: c++03, c++11, c++14
11+
// UNSUPPORTED: no-exceptions
1112

1213
// Support for catching a function pointer including noexcept was shipped in macOS 10.13
1314
// XFAIL: use_system_cxx_lib && {{.+}}-apple-macosx10.{{9|10|11|12}}

0 commit comments

Comments
 (0)