[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
This commit is contained in:
@@ -22,6 +22,10 @@ struct TestType {};
|
|||||||
using std::any;
|
using std::any;
|
||||||
using std::any_cast;
|
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()
|
void test_const_lvalue_cast_request_non_const_lvalue()
|
||||||
{
|
{
|
||||||
const any a;
|
const any a;
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
struct TestType {};
|
struct TestType {};
|
||||||
struct TestType2 {};
|
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()
|
int main()
|
||||||
{
|
{
|
||||||
using std::any;
|
using std::any;
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ struct no_move {
|
|||||||
no_move(no_move const&) {}
|
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() {
|
int main() {
|
||||||
any a;
|
any a;
|
||||||
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
|
// expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
|
||||||
|
|||||||
@@ -338,9 +338,6 @@ class Configuration(object):
|
|||||||
|
|
||||||
def configure_use_clang_verify(self):
|
def configure_use_clang_verify(self):
|
||||||
'''If set, run clang with -verify on failing tests.'''
|
'''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')
|
self.use_clang_verify = self.get_lit_bool('use_clang_verify')
|
||||||
if self.use_clang_verify is None:
|
if self.use_clang_verify is None:
|
||||||
# NOTE: We do not test for the -verify flag directly because
|
# NOTE: We do not test for the -verify flag directly because
|
||||||
|
|||||||
Reference in New Issue
Block a user