[libcxx] r349189 - Tolerate Clangs new static_assert messages

Eric Fiselier eric at efcs.ca
Fri Dec 14 12:42:36 PST 2018


Author: ericwf
Date: Fri Dec 14 12:42:36 2018
New Revision: 349189

URL: http://llvm.org/viewvc/llvm-project?rev=349189&view=rev
Log:
Tolerate Clangs new static_assert messages

Modified:
    libcxx/trunk/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
    libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
    libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
    libcxx/trunk/test/std/containers/sequences/array/array.tuple/get.fail.cpp
    libcxx/trunk/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
    libcxx/trunk/test/std/containers/views/span.cons/default.fail.cpp

Modified: libcxx/trunk/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp Fri Dec 14 12:42:36 2018
@@ -20,6 +20,6 @@ int main()
     {
     typedef std::pair<int, double> P;
     std::tuple_element<2, P>::type foo; // expected-note {{requested here}}
-        // expected-error at utility:* {{static_assert failed "Index out of bounds in std::tuple_element<std::pair<T1, T2>>"}}
+        // expected-error-re at utility:* {{static_assert failed{{( due to requirement '2UL < 2')?}} "Index out of bounds in std::tuple_element<std::pair<T1, T2>>"}}
     }
 }

Modified: libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp Fri Dec 14 12:42:36 2018
@@ -31,6 +31,6 @@ int main()
     {
         typedef std::variant<int, double> T;
         std::variant_alternative<2, T>::type foo; // expected-note {{requested here}}
-        // expected-error at variant:* {{static_assert failed "Index out of bounds in std::variant_alternative<>"}}
+        // expected-error-re at variant:* {{static_assert failed{{( due to requirement '2UL < sizeof...\(_Types\)')?}} "Index out of bounds in std::variant_alternative<>"}}
     }
 }

Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp Fri Dec 14 12:42:36 2018
@@ -34,7 +34,7 @@ template <class PopulationIterator, clas
 }
 
 int main() {
-  // expected-error at algorithm:* {{static_assert failed "SampleIterator must meet the requirements of RandomAccessIterator"}}
+  // expected-error-re at algorithm:* {{static_assert failed{{( due to requirement '.*')?}} "SampleIterator must meet the requirements of RandomAccessIterator"}}
   // expected-error at algorithm:* 2 {{does not provide a subscript operator}}
   // expected-error at algorithm:* {{invalid operands}}
   test<input_iterator<int *>, output_iterator<int *> >();

Modified: libcxx/trunk/test/std/containers/sequences/array/array.tuple/get.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/array.tuple/get.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/array/array.tuple/get.fail.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/array/array.tuple/get.fail.cpp Fri Dec 14 12:42:36 2018
@@ -31,6 +31,6 @@ int main()
         typedef std::array<T, 3> C;
         C c = {1, 2, 3.5};
         std::get<3>(c) = 5.5; // expected-note {{requested here}}
-        // expected-error at array:* {{static_assert failed "Index out of bounds in std::get<> (std::array)"}}
+        // expected-error-re at array:* {{static_assert failed{{( due to requirement '3UL < 3UL')?}} "Index out of bounds in std::get<> (std::array)"}}
     }
 }

Modified: libcxx/trunk/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp Fri Dec 14 12:42:36 2018
@@ -30,6 +30,6 @@ int main()
         typedef double T;
         typedef std::array<T, 3> C;
         std::tuple_element<3, C> foo; // expected-note {{requested here}}
-        // expected-error at array:* {{static_assert failed "Index out of bounds in std::tuple_element<> (std::array)"}}
+        // expected-error-re at array:* {{static_assert failed{{( due to requirement '3UL < 3UL')?}} "Index out of bounds in std::tuple_element<> (std::array)"}}
     }
 }

Modified: libcxx/trunk/test/std/containers/views/span.cons/default.fail.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/views/span.cons/default.fail.cpp?rev=349189&r1=349188&r2=349189&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/views/span.cons/default.fail.cpp (original)
+++ libcxx/trunk/test/std/containers/views/span.cons/default.fail.cpp Fri Dec 14 12:42:36 2018
@@ -25,7 +25,7 @@
 
 int main ()
 {
-    std::span<int, 2> s; // expected-error at span:* {{static_assert failed "Can't default construct a statically sized span with size > 0"}}
+    std::span<int, 2> s; // expected-error-re at span:* {{static_assert failed{{( due to requirement '2L == 0')?}} "Can't default construct a statically sized span with size > 0"}}
 
 //  TODO: This is what I want:
 // eXpected-error {{no matching constructor for initialization of 'std::span<int, 2>'}}




More information about the libcxx-commits mailing list