summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-04-25 00:35:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-04-25 00:35:01 +0000
commitd8b01111a0ec33a1a37f264940e3b6e99945ca8f (patch)
treede0f0c773b4970638c61a49bf577ca466c3f1e22 /libcxx/test/std
parent1d6d98809c0f162acbfdaabe0c360e1215b06273 (diff)
downloadbcm5719-llvm-d8b01111a0ec33a1a37f264940e3b6e99945ca8f.tar.gz
bcm5719-llvm-d8b01111a0ec33a1a37f264940e3b6e99945ca8f.zip
Use modern type trait implementations when available.
Teach libcxx to stop using various deprecated __has_* type traits, in favor of the ("modern", C++11 era) __is_* type traits. This is mostly just a simplification, but fixes at least one bug: _Atomic T should be considered trivially-destructible, but is not considered to be POD by Clang, and __has_trivial_destructor is specified in the GCC documentation as returning false for non-POD non-class types. Differential Revision: https://reviews.llvm.org/D48292 llvm-svn: 359159
Diffstat (limited to 'libcxx/test/std')
-rw-r--r--libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
index e79e4926b0d..3fc1d837422 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp
@@ -116,5 +116,11 @@ int main(int, char**)
test_is_not_trivially_destructible<PurePrivateDestructor>();
#endif
+#if TEST_HAS_BUILTIN_IDENTIFIER(_Atomic)
+ test_is_trivially_destructible<_Atomic int>();
+ test_is_trivially_destructible<_Atomic float>();
+ test_is_trivially_destructible<_Atomic int*>();
+#endif
+
return 0;
}
OpenPOWER on IntegriCloud