forked from OSchip/llvm-project
[libc++] Mark bad_any_cast tests as unsupported when the dylib doesn't support bad_any_cast
With the latest compiler fix to availability, some availability failures that didn't trigger before now trigger. llvm-svn: 356678
This commit is contained in:
parent
408eb44f49
commit
f3486db1f7
|
@ -7,6 +7,7 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||||
|
// UNSUPPORTED: dylib-has-no-bad_any_cast
|
||||||
|
|
||||||
// <any>
|
// <any>
|
||||||
|
|
||||||
|
@ -21,10 +22,6 @@ 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;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||||
|
// UNSUPPORTED: dylib-has-no-bad_any_cast
|
||||||
|
|
||||||
// <any>
|
// <any>
|
||||||
|
|
||||||
|
@ -20,10 +21,6 @@
|
||||||
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, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
using std::any;
|
using std::any;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
// UNSUPPORTED: c++98, c++03, c++11, c++14
|
||||||
|
// UNSUPPORTED: dylib-has-no-bad_any_cast
|
||||||
|
|
||||||
// <any>
|
// <any>
|
||||||
|
|
||||||
|
@ -39,10 +40,6 @@ 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, char**) {
|
int main(int, char**) {
|
||||||
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"}}
|
||||||
|
|
Loading…
Reference in New Issue