Selaa lähdekoodia

[libcxx] Use clang-verify in the lit test suite even when availability is enabled

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347780 91177308-0d34-0410-b5e6-96231b3b80d8
Louis Dionne 6 vuotta sitten
vanhempi
commit
97c03fb705

+ 4 - 0
test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp

@@ -22,6 +22,10 @@ struct TestType {};
 using std::any;
 using std::any_cast;
 
+// On platforms that do not support any_cast, an additional availability error
+// is triggered by these tests.
+// expected-error@any_cast_request_invalid_value_category.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
+
 void test_const_lvalue_cast_request_non_const_lvalue()
 {
     const any a;

+ 4 - 0
test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp

@@ -21,6 +21,10 @@
 struct TestType {};
 struct TestType2 {};
 
+// On platforms that do not support any_cast, an additional availability error
+// is triggered by these tests.
+// expected-error@const_correctness.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
+
 int main()
 {
     using std::any;

+ 4 - 0
test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp

@@ -40,6 +40,10 @@ struct no_move {
   no_move(no_move const&) {}
 };
 
+// On platforms that do not support any_cast, an additional availability error
+// is triggered by these tests.
+// expected-error@not_copy_constructible.fail.cpp:* 0+ {{call to unavailable function 'any_cast': introduced in macOS 10.14}}
+
 int main() {
     any a;
     // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}

+ 0 - 3
utils/libcxx/test/config.py

@@ -338,9 +338,6 @@ class Configuration(object):
 
     def configure_use_clang_verify(self):
         '''If set, run clang with -verify on failing tests.'''
-        if self.with_availability:
-            self.use_clang_verify = False
-            return
         self.use_clang_verify = self.get_lit_bool('use_clang_verify')
         if self.use_clang_verify is None:
             # NOTE: We do not test for the -verify flag directly because