summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-07-06 18:39:01 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-07-06 18:39:01 +0000
commit227001d12eaea3491a528a3a018a8f12632c12cf (patch)
treeff9e9b27aead77484fa99edec5136660eb86e7af /libcxx/test
parent7dd29d4d3d1c2fdcb4917d4121c3352650f83d38 (diff)
downloadbcm5719-llvm-227001d12eaea3491a528a3a018a8f12632c12cf.tar.gz
bcm5719-llvm-227001d12eaea3491a528a3a018a8f12632c12cf.zip
Add noexcept test for offsetof macro per [support.types]/p4.
llvm-svn: 159846
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/language.support/support.types/offsetof.pass.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/language.support/support.types/offsetof.pass.cpp b/libcxx/test/language.support/support.types/offsetof.pass.cpp
index 758f21529ff..e36ac22974f 100644
--- a/libcxx/test/language.support/support.types/offsetof.pass.cpp
+++ b/libcxx/test/language.support/support.types/offsetof.pass.cpp
@@ -13,6 +13,14 @@
#error offsetof not defined
#endif
+struct A
+{
+ int x;
+};
+
int main()
{
+#if (__has_feature(cxx_noexcept))
+ static_assert(noexcept(offsetof(A, x)), "");
+#endif
}
OpenPOWER on IntegriCloud