[libcxx-commits] [libcxx] b93376f - [libc++][type_traits] `reference_{constructs|converts}_from_temporary` with `-Winvalid-specialization` tests (#133946)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 3 13:18:07 PDT 2025
Author: Hristo Hristov
Date: 2025-04-03T23:18:04+03:00
New Revision: b93376f899824ad8543b961f2f79de6841034090
URL: https://github.com/llvm/llvm-project/commit/b93376f899824ad8543b961f2f79de6841034090
DIFF: https://github.com/llvm/llvm-project/commit/b93376f899824ad8543b961f2f79de6841034090.diff
LOG: [libc++][type_traits] `reference_{constructs|converts}_from_temporary` with `-Winvalid-specialization` tests (#133946)
Addresses comment:
https://github.com/llvm/llvm-project/pull/128649/files#r2022341035
---------
Co-authored-by: Hristo Hristov <zingam at outlook.com>
Added:
Modified:
libcxx/test/libcxx/type_traits/no_specializations.verify.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp b/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp
index 807d01e381b49..38560161f162e 100644
--- a/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp
+++ b/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp
@@ -156,6 +156,12 @@ SPECIALIZE_UTT(is_unbounded_array); // expected-error 2 {{cannot be speciali
# if TEST_STD_VER >= 23
SPECIALIZE_UTT(is_implicit_lifetime); // expected-error 2 {{cannot be specialized}}
SPECIALIZE_UTT(is_scoped_enum); // expected-error 2 {{cannot be specialized}}
+# if __has_builtin(__reference_constructs_from_temporary)
+SPECIALIZE_BTT(reference_constructs_from_temporary); // expected-error 2 {{cannot be specialized}}
+# endif
+# if __has_builtin(__reference_converts_from_temporary)
+SPECIALIZE_BTT(reference_converts_from_temporary); // expected-error 2 {{cannot be specialized}}
+# endif
# endif
# if TEST_STD_VER >= 26
@@ -177,8 +183,8 @@ struct std::conditional<true, S, S>; // expected-error {{cannot be specialized}}
template <>
struct std::enable_if<true, S>; // expected-error {{cannot be specialized}}
-#if TEST_STD_VER >= 20
+# if TEST_STD_VER >= 20
template <>
struct std::integral_constant<S, {}>; // expected-error {{cannot be specialized}}
-#endif
+# endif
#endif
More information about the libcxx-commits
mailing list