-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libc++][NFC] Cleanup is_implicit_life_time test #164154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++][NFC] Cleanup is_implicit_life_time test #164154
Conversation
|
@llvm/pr-subscribers-libcxx Author: Hristo Hristov (H-G-Hristov) ChangesRemoved unsupported compilers and simplified the test a bit. Full diff: https://github.com/llvm/llvm-project/pull/164154.diff 1 Files Affected:
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
index 881a5d2c6f751..bdf502d140623 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_implicit_lifetime.pass.cpp
@@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+// REQUIRES: std-at-least-c++23
// These compilers don't support __builtin_is_implicit_lifetime yet.
-// UNSUPPORTED: clang-19, gcc-14, gcc-15, apple-clang-16, apple-clang-17
+// UNSUPPORTED: clang-19, gcc-15, apple-clang-17
// <type_traits>
@@ -139,13 +139,6 @@ constexpr void test_is_implicit_lifetime() {
test_is_implicit_lifetime<T[94], true>();
}
-struct ArithmeticTypesTest {
- template <class T>
- constexpr void operator()() {
- test_is_implicit_lifetime<T>();
- }
-};
-
constexpr bool test() {
// Standard fundamental C++ types
@@ -155,7 +148,7 @@ constexpr bool test() {
test_is_implicit_lifetime<const void, false>();
test_is_implicit_lifetime<volatile void, false>();
- types::for_each(types::arithmetic_types(), ArithmeticTypesTest{});
+ types::for_each(types::arithmetic_types(), []<typename T> { test_is_implicit_lifetime<T>(); });
test_is_implicit_lifetime<Enum>();
test_is_implicit_lifetime<SignedEnum>();
@@ -166,7 +159,7 @@ constexpr bool test() {
test_is_implicit_lifetime<UnsignedEnumClass>();
test_is_implicit_lifetime<void(), false>();
- test_is_implicit_lifetime<void()&, false>();
+ test_is_implicit_lifetime<void() &, false>();
test_is_implicit_lifetime<void() const, false>();
test_is_implicit_lifetime<void (&)(), false>();
test_is_implicit_lifetime<void (*)(), true>();
@@ -177,8 +170,8 @@ constexpr bool test() {
test_is_implicit_lifetime<int EmptyStruct::*, true>(); // Pointer-to-member
test_is_implicit_lifetime<int (EmptyStruct::*)(), true>();
test_is_implicit_lifetime<int (EmptyStruct::*)() const, true>();
- test_is_implicit_lifetime<int (EmptyStruct::*)()&, true>();
- test_is_implicit_lifetime<int (EmptyStruct::*)()&&, true>();
+ test_is_implicit_lifetime<int (EmptyStruct::*)() &, true>();
+ test_is_implicit_lifetime<int (EmptyStruct::*)() &&, true>();
test_is_implicit_lifetime<IncompleteStruct[], true>();
test_is_implicit_lifetime<IncompleteStruct[82], true>();
|
528cac5 to
b1bbc40
Compare
Removed unsupported compilers and simplified the test a bit.
b1bbc40 to
6438511
Compare
|
We are still skipping testing on Apple Clang 17, see #131302 but Xcode 26 (Apple Clang 17) claims to support |
Removed unsupported compilers and simplified the test a bit.
Removed unsupported compilers and simplified the test a bit.
Removed unsupported compilers and simplified the test a bit.