[libcxx] Fix the binder deprecation tests on Clang 5.

Tested on Docker containers with Clang 4, 5 and 6.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Louis Dionne
2018-09-23 23:17:48 +00:00
parent 58deb8a9c9
commit 2495dabf93
11 changed files with 44 additions and 108 deletions

View File

@@ -19,6 +19,7 @@
// RandomNumberGenerator& rand);
// UNSUPPORTED: clang-4.0
// UNSUPPORTED: c++98, c++03, c++11
// REQUIRES: verify-support
// MODULES_DEFINES: _LIBCPP_ENABLE_DEPRECATION_WARNINGS
@@ -42,14 +43,8 @@ struct gen
int main()
{
#if TEST_STD_VER < 14
// expected-no-diagnostics
#else
// expected-error@* 1 {{'random_shuffle<int *>' is deprecated}}
// expected-error@* 1 {{'random_shuffle<int *, gen &>' is deprecated}}
#endif
int v[1] = {1};
std::random_shuffle(&v[0], &v[1]);
std::random_shuffle(&v[0], &v[1]); // expected-error{{'random_shuffle<int *>' is deprecated}}
gen r;
std::random_shuffle(&v[0], &v[1], r);
std::random_shuffle(&v[0], &v[1], r); // expected-error{{'random_shuffle<int *, gen &>' is deprecated}}
}