From f7aaaaaa659db98e2f9a302b9df76e159befded1 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 17 Sep 2017 21:50:59 +0000 Subject: [PATCH] Fix two failing -verify tests to tolerate old and new clang versions git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@313502 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../any.nonmembers/any.cast/const_correctness.fail.cpp | 8 ++++---- test/std/utilities/utility/forward/forward.fail.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp b/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp index 0a7712f5e..bad229dac 100644 --- a/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp +++ b/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp @@ -29,18 +29,18 @@ int main() any a; // expected-error@any:* {{binding value of type 'const TestType' to reference to type 'TestType' drops 'const' qualifier}} - // expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} + // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} any_cast(static_cast(a)); // expected-note {{requested here}} // expected-error@any:* {{cannot cast from lvalue of type 'const TestType' to rvalue reference type 'TestType &&'; types are not compatible}} - // expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} + // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} any_cast(static_cast(a)); // expected-note {{requested here}} // expected-error@any:* {{binding value of type 'const TestType2' to reference to type 'TestType2' drops 'const' qualifier}} - // expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} + // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} any_cast(static_cast(a)); // expected-note {{requested here}} // expected-error@any:* {{cannot cast from lvalue of type 'const TestType2' to rvalue reference type 'TestType2 &&'; types are not compatible}} - // expected-error-re@any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} + // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}} any_cast(static_cast(a)); // expected-note {{requested here}} } diff --git a/test/std/utilities/utility/forward/forward.fail.cpp b/test/std/utilities/utility/forward/forward.fail.cpp index 772d58fa6..c845216d8 100644 --- a/test/std/utilities/utility/forward/forward.fail.cpp +++ b/test/std/utilities/utility/forward/forward.fail.cpp @@ -25,7 +25,7 @@ int main() #if TEST_STD_VER >= 11 { std::forward(source()); // expected-note {{requested here}} - // expected-error-re@type_traits:* 1 {{static_assert failed {{.*}} "can not forward an rvalue as an lvalue"}} + // expected-error-re@type_traits:* 1 {{static_assert failed{{.*}} "can not forward an rvalue as an lvalue"}} } #else {