[libcxx] r313499 - Fix failing -verify tests due to change in Clangs static_assert message.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 17 13:57:06 PDT 2017


Author: ericwf
Date: Sun Sep 17 13:57:05 2017
New Revision: 313499

URL: http://llvm.org/viewvc/llvm-project?rev=313499&view=rev
Log:
Fix failing -verify tests due to change in Clangs static_assert message.

Clang recently changed the way it outputs static assert diagnostics.
This patch fixes libc++'s -verify tests so they tolerate both the old
and new message format.

Modified:
    libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp
    libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
    libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
    libcxx/trunk/test/std/experimental/any/any.class/any.assign/value_non_copyable_assign.fail.cpp
    libcxx/trunk/test/std/experimental/any/any.class/any.cons/non_copyable_value.fail.cpp
    libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/reference_types.fail.cpp
    libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
    libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp
    libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
    libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
    libcxx/trunk/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
    libcxx/trunk/test/std/utilities/utility/forward/forward.fail.cpp

Modified: libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp (original)
+++ libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/reverse_iterator_produces_diagnostic.fail.cpp Sun Sep 17 13:57:05 2017
@@ -23,7 +23,7 @@ int main() {
   using namespace fs;
   using RIt = std::reverse_iterator<path::iterator>;
 
-  // expected-error at iterator:* {{static_assert failed "The specified iterator type cannot be used with reverse_iterator; Using stashing iterators with reverse_iterator causes undefined behavior"}}
+  // expected-error-re at iterator:* {{static_assert failed{{.*}} "The specified iterator type cannot be used with reverse_iterator; Using stashing iterators with reverse_iterator causes undefined behavior"}}
   {
     RIt r;
     ((void)r);

Modified: libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp Sun Sep 17 13:57:05 2017
@@ -36,7 +36,7 @@ int main() {
     SPtr<2> s2(getFn<2>(), Deleter{}); // OK
     SPtr<3> s3(nullptr, Deleter{}); // OK
   }
-  // expected-error at memory:* 2 {{static_assert failed "default_delete cannot be instantiated for function types"}}
+  // expected-error-re at memory:* 2 {{static_assert failed{{.*}} "default_delete cannot be instantiated for function types"}}
   {
     SPtr<4> s4(getFn<4>()); // expected-note {{requested here}}
     SPtr<5> s5(getFn<5>(), std::default_delete<FnType<5>>{}); // expected-note {{requested here}}

Modified: libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.fail.cpp Sun Sep 17 13:57:05 2017
@@ -22,7 +22,7 @@
 int main() {
     std::allocator<void> alloc;
 
-    // expected-error at tuple:* 4 {{static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"}}
+    // expected-error-re at tuple:* 4 {{static_assert failed{{.*}} "Attempted to construct a reference element in a tuple with an rvalue"}}
 
     // bind lvalue to rvalue
     std::tuple<int const&> t(42); // expected-note {{requested here}}

Modified: libcxx/trunk/test/std/experimental/any/any.class/any.assign/value_non_copyable_assign.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/any/any.class/any.assign/value_non_copyable_assign.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/any/any.class/any.assign/value_non_copyable_assign.fail.cpp (original)
+++ libcxx/trunk/test/std/experimental/any/any.class/any.assign/value_non_copyable_assign.fail.cpp Sun Sep 17 13:57:05 2017
@@ -32,7 +32,7 @@ int main()
     using namespace std::experimental;
     non_copyable nc;
     any a;
-    a = static_cast<non_copyable &&>(nc); // expected-error at experimental/any:* 2 {{static_assert failed "_ValueType must be CopyConstructible."}}
+    a = static_cast<non_copyable &&>(nc); // expected-error-re at experimental/any:* 2 {{static_assert failed{{.*}} "_ValueType must be CopyConstructible."}}
         // expected-error at experimental/any:* {{calling a private constructor of class 'non_copyable'}}
 
 }

Modified: libcxx/trunk/test/std/experimental/any/any.class/any.cons/non_copyable_value.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/any/any.class/any.cons/non_copyable_value.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/any/any.class/any.cons/non_copyable_value.fail.cpp (original)
+++ libcxx/trunk/test/std/experimental/any/any.class/any.cons/non_copyable_value.fail.cpp Sun Sep 17 13:57:05 2017
@@ -31,6 +31,6 @@ int main()
     using namespace std::experimental;
     non_copyable nc;
     any a(static_cast<non_copyable &&>(nc));
-    // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType must be CopyConstructible."}}
+    // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType must be CopyConstructible."}}
     // expected-error at experimental/any:* 1 {{calling a private constructor of class 'non_copyable'}}
 }

Modified: libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/reference_types.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/reference_types.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/reference_types.fail.cpp (original)
+++ libcxx/trunk/test/std/experimental/any/any.nonmembers/any.cast/reference_types.fail.cpp Sun Sep 17 13:57:05 2017
@@ -25,13 +25,13 @@ using std::experimental::any_cast;
 int main()
 {
     any a(1);
-    any_cast<int &>(&a); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int &&>(&a); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int const &>(&a); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int const&&>(&a); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    any_cast<int &>(&a); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int &&>(&a); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int const &>(&a); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int const&&>(&a); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any const& a2 = a;
-    any_cast<int &>(&a2); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int &&>(&a2); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int const &>(&a2); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
-    any_cast<int const &&>(&a2); // expected-error at experimental/any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    any_cast<int &>(&a2); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int &&>(&a2); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int const &>(&a2); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
+    any_cast<int const &&>(&a2); // expected-error-re at experimental/any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
 }

Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp Sun Sep 17 13:57:05 2017
@@ -25,12 +25,12 @@ using std::any_cast;
 void test_const_lvalue_cast_request_non_const_lvalue()
 {
     const any a;
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{binding value of type 'const TestType' to reference to type 'TestType' drops 'const' qualifier}}
     any_cast<TestType &>(a); // expected-note {{requested here}}
 
     const any a2(42);
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{binding value of type 'const int' to reference to type 'int' drops 'const' qualifier}}
     any_cast<int&>(a2); // expected-note {{requested here}}
 }
@@ -38,22 +38,22 @@ void test_const_lvalue_cast_request_non_
 void test_lvalue_any_cast_request_rvalue()
 {
     any a;
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
     any_cast<TestType &&>(a); // expected-note {{requested here}}
 
     any a2(42);
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
     any_cast<int&&>(a2); // expected-note {{requested here}}
 }
 
 void test_rvalue_any_cast_request_lvalue()
 {
     any a;
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{non-const lvalue reference to type 'TestType' cannot bind to a temporary}}
     any_cast<TestType &>(std::move(a)); // expected-note {{requested here}}
 
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{non-const lvalue reference to type 'int' cannot bind to a temporary}}
     any_cast<int&>(42);
 }

Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp Sun Sep 17 13:57:05 2017
@@ -29,18 +29,18 @@ int main()
     any a;
 
     // expected-error at any:* {{binding value of type 'const TestType' to reference to type 'TestType' drops 'const' qualifier}}
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     any_cast<TestType &>(static_cast<any const&>(a)); // expected-note {{requested here}}
 
     // expected-error at any:* {{cannot cast from lvalue of type 'const TestType' to rvalue reference type 'TestType &&'; types are not compatible}}
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     any_cast<TestType &&>(static_cast<any const&>(a)); // expected-note {{requested here}}
 
     // expected-error at any:* {{binding value of type 'const TestType2' to reference to type 'TestType2' drops 'const' qualifier}}
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     any_cast<TestType2 &>(static_cast<any const&&>(a)); // expected-note {{requested here}}
 
     // expected-error at any:* {{cannot cast from lvalue of type 'const TestType2' to rvalue reference type 'TestType2 &&'; types are not compatible}}
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed {{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     any_cast<TestType2 &&>(static_cast<any const&&>(a)); // expected-note {{requested here}}
 }

Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp Sun Sep 17 13:57:05 2017
@@ -42,17 +42,17 @@ struct no_move {
 
 int main() {
     any a;
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an lvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{static_cast from 'no_copy' to 'no_copy' uses deleted function}}
     any_cast<no_copy>(static_cast<any&>(a)); // expected-note {{requested here}}
 
-    // expected-error at any:* {{static_assert failed "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be a const lvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{static_cast from 'const no_copy' to 'no_copy' uses deleted function}}
     any_cast<no_copy>(static_cast<any const&>(a)); // expected-note {{requested here}}
 
     any_cast<no_copy>(static_cast<any &&>(a)); // OK
 
-    // expected-error at any:* {{static_assert failed "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re at any:* {{static_assert failed{{.*}} "ValueType is required to be an rvalue reference or a CopyConstructible type"}}
     // expected-error at any:* {{static_cast from 'typename remove_reference<no_move &>::type' (aka 'no_move') to 'no_move' uses deleted function}}
     any_cast<no_move>(static_cast<any &&>(a));
 }

Modified: libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp Sun Sep 17 13:57:05 2017
@@ -26,29 +26,29 @@ int main()
 {
     any a(1);
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int &>(&a); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int &&>(&a); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int const &>(&a); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int const&&>(&a); // expected-note {{requested here}}
 
     any const& a2 = a;
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int &>(&a2); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int &&>(&a2); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int const &>(&a2); // expected-note {{requested here}}
 
-    // expected-error at any:* 1 {{static_assert failed "_ValueType may not be a reference."}}
+    // expected-error-re at any:* 1 {{static_assert failed{{.*}} "_ValueType may not be a reference."}}
     any_cast<int const &&>(&a2); // expected-note {{requested here}}
 }

Modified: libcxx/trunk/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp Sun Sep 17 13:57:05 2017
@@ -26,22 +26,22 @@ int main()
 {
     using std::optional;
     {
-        // expected-error at optional:* 2 {{static_assert failed "instantiation of optional with a reference type is ill-formed}}
+        // expected-error-re at optional:* 2 {{static_assert failed{{.*}} "instantiation of optional with a reference type is ill-formed}}
         optional<int&> opt1;
         optional<int&&> opt2;
     }
     {
-        // expected-error at optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed"}}
+        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}}
         optional<X> opt3;
     }
     {
-        // expected-error at optional:* {{static_assert failed "instantiation of optional with a non-object type is undefined behavior"}}
-        // expected-error at optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed}}
+        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-object type is undefined behavior"}}
+        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed}}
         optional<void()> opt4;
     }
     {
-        // expected-error at optional:* {{static_assert failed "instantiation of optional with a non-object type is undefined behavior"}}
-        // expected-error at optional:* {{static_assert failed "instantiation of optional with a non-destructible type is ill-formed}}
+        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-object type is undefined behavior"}}
+        // expected-error-re at optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed}}
         // expected-error at optional:* 1+ {{cannot form a reference to 'void'}}
         optional<const void> opt4;
     }

Modified: libcxx/trunk/test/std/utilities/utility/forward/forward.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/forward/forward.fail.cpp?rev=313499&r1=313498&r2=313499&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/utility/forward/forward.fail.cpp (original)
+++ libcxx/trunk/test/std/utilities/utility/forward/forward.fail.cpp Sun Sep 17 13:57:05 2017
@@ -25,7 +25,7 @@ int main()
 #if TEST_STD_VER >= 11
     {
         std::forward<A&>(source());  // expected-note {{requested here}}
-        // expected-error at type_traits:* 1 {{static_assert failed "can not forward an rvalue as an lvalue"}}
+        // expected-error-re at type_traits:* 1 {{static_assert failed {{.*}} "can not forward an rvalue as an lvalue"}}
     }
 #else
     {




More information about the cfe-commits mailing list