[cfe-commits] [libcxx] r159846 - /libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp
Howard Hinnant
hhinnant at apple.com
Fri Jul 6 11:39:01 PDT 2012
Author: hhinnant
Date: Fri Jul 6 13:39:01 2012
New Revision: 159846
URL: http://llvm.org/viewvc/llvm-project?rev=159846&view=rev
Log:
Add noexcept test for offsetof macro per [support.types]/p4.
Modified:
libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp
Modified: libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp?rev=159846&r1=159845&r2=159846&view=diff
==============================================================================
--- libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp (original)
+++ libcxx/trunk/test/language.support/support.types/offsetof.pass.cpp Fri Jul 6 13:39:01 2012
@@ -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
}
More information about the cfe-commits
mailing list