Re: [PATCH] D20730: [libcxx] Prefer UNSUPPORTED over conditional compilation for tests

2016-05-27 Thread Ben Craig via cfe-commits
bcraig added subscribers: mclow.lists, bcraig.
bcraig added a comment.

LGTM.  Add @mclow.lists as a reviewer.


http://reviews.llvm.org/D20730



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D20730: [libcxx] Prefer UNSUPPORTED over conditional compilation for tests

2016-05-27 Thread Asiri Rathnayake via cfe-commits
rmaprath created this revision.
rmaprath added a reviewer: EricWF.
rmaprath added a subscriber: cfe-commits.

We seem to have quite a few tests where an entire test is conditionalized over 
some range of `_LIBCPP_STD_VER`. We should consider getting rid of these and 
using the UNSUPPORTED lit directive instead.

This is mostly cosmetic, but sometimes can create problems if there are also 
XFAIL conditions on the same test. The test will be reported as an 
unexpected-pass when run with a `std=` option not compatible with the 
`_LIBCPP_STD_VER` check (because the test is trivially empty, it will pass 
rather than XFAIL).

I've attached a sample patch for one of the cases. If this looks OK, I can 
commit the whole hog.

http://reviews.llvm.org/D20730

Files:
  
test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp

Index: 
test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
===
--- 
test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
+++ 
test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
@@ -7,6 +7,7 @@
 //
 
//===--===//
 
+// UNSUPPORTED: c++98, c++03, c++11
 // XFAIL: libcpp-no-exceptions
 // dynarray.overview
 
@@ -15,8 +16,6 @@
   
 #include <__config>
 
-#if _LIBCPP_STD_VER > 11
-
 #include 
 #include 
 
@@ -90,6 +89,3 @@
 test ( {} );
 test ( {} );
 }
-#else
-int main() {}
-#endif


Index: test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
===
--- test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
+++ test/libcxx/experimental/containers/sequences/dynarray/dynarray.overview/at.pass.cpp
@@ -7,6 +7,7 @@
 //
 //===--===//
 
+// UNSUPPORTED: c++98, c++03, c++11
 // XFAIL: libcpp-no-exceptions
 // dynarray.overview
 
@@ -15,8 +16,6 @@
   
 #include <__config>
 
-#if _LIBCPP_STD_VER > 11
-
 #include 
 #include 
 
@@ -90,6 +89,3 @@
 test ( {} );
 test ( {} );
 }
-#else
-int main() {}
-#endif
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits