Author: Corentin Jabot
Date: 2022-06-30T23:59:21+02:00
New Revision: da1609ad73540978f66111e96ea500b97ca9b39a

URL: 
https://github.com/llvm/llvm-project/commit/da1609ad73540978f66111e96ea500b97ca9b39a
DIFF: 
https://github.com/llvm/llvm-project/commit/da1609ad73540978f66111e96ea500b97ca9b39a.diff

LOG: Improve the formatting of static_assert messages

Display 'static_assert failed: message' instead of
'static_assert failed "message"' to be consistent
with other implementations and be slightly more
readable.

Reviewed By: #libc, aaron.ballman, philnik, Mordante

Differential Revision: https://reviews.llvm.org/D128844

Added: 
    

Modified: 
    clang/include/clang/Basic/DiagnosticSemaKinds.td
    clang/lib/Sema/SemaDeclCXX.cpp
    clang/test/C/drs/dr0xx.c
    clang/test/CXX/dcl.dcl/p4-0x.cpp
    clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
    clang/test/PCH/cxx-static_assert.cpp
    clang/test/Sema/static-assert.c
    clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp
    clang/test/SemaCXX/static-assert.cpp
    
libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
    
libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp
    
libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp
    
libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp
    
libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
    
libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
    
libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp
    
libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
    libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
    
libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
    
libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
    
libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp
    
libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
    
libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
    
libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
    
libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
    libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp
    
libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp
    libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp
    libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp
    libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp
    
libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
    
libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
    libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
    
libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
    
libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp
    libcxx/test/std/numerics/numbers/illformed.verify.cpp
    libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp
    libcxx/test/std/strings/basic.string/char.bad.verify.cpp
    libcxx/test/std/strings/string.view/char.bad.fail.cpp
    libcxx/test/std/time/time.hms/hhmmss.fail.cpp
    
libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
    
libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
    
libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
    
libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
    libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
    
libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
    
libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
    
libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
    libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp
    libcxx/test/std/utilities/utility/forward/forward.fail.cpp
    libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td 
b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 880fe0d18a02e..bc7aec3803e82 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1529,9 +1529,9 @@ def err_static_assert_expression_is_not_constant : Error<
   "static_assert expression is not an integral constant expression">;
 def err_constexpr_if_condition_expression_is_not_constant : Error<
   "constexpr if condition is not a constant expression">;
-def err_static_assert_failed : Error<"static_assert failed%select{ %1|}0">;
+def err_static_assert_failed : Error<"static_assert failed%select{: %1|}0">;
 def err_static_assert_requirement_failed : Error<
-  "static_assert failed due to requirement '%0'%select{ %2|}1">;
+  "static_assert failed due to requirement '%0'%select{: %2|}1">;
 
 def warn_consteval_if_always_true : Warning<
   "consteval if is always true in an %select{unevaluated|immediate}0 context">,

diff  --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index f7cbfdb6fcebb..a70c8579c6549 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -16595,7 +16595,7 @@ Decl *Sema::BuildStaticAssertDeclaration(SourceLocation 
StaticAssertLoc,
       if (AssertMessage) {
         const auto *MsgStr = cast<StringLiteral>(AssertMessage);
         if (MsgStr->isOrdinary())
-          Msg << '"' << MsgStr->getString() << '"';
+          Msg << MsgStr->getString();
         else
           MsgStr->printPretty(Msg, nullptr, getPrintingPolicy());
       }

diff  --git a/clang/test/C/drs/dr0xx.c b/clang/test/C/drs/dr0xx.c
index 3502efefa0813..4f0a505ec4f03 100644
--- a/clang/test/C/drs/dr0xx.c
+++ b/clang/test/C/drs/dr0xx.c
@@ -203,7 +203,7 @@ _Static_assert(THIS$AND$THAT(1, 1) == 2, "fail"); /* 
expected-warning 2 {{'$' in
  * Note: the rule changed in C99 to be 
diff erent than the resolution to DR029,
  * so it's not clear there's value in implementing this DR.
  */
-_Static_assert(__builtin_types_compatible_p(struct S { int a; }, union U { int 
a; }), "fail"); /* expected-error {{static_assert failed due to requirement 
'__builtin_types_compatible_p(struct S, union U)' "fail"}} */
+_Static_assert(__builtin_types_compatible_p(struct S { int a; }, union U { int 
a; }), "fail"); /* expected-error {{static_assert failed due to requirement 
'__builtin_types_compatible_p(struct S, union U)': fail}} */
 
 /* WG14 DR031: yes
  * Can constant expressions overflow?

diff  --git a/clang/test/CXX/dcl.dcl/p4-0x.cpp 
b/clang/test/CXX/dcl.dcl/p4-0x.cpp
index 1f4cdda1a1f57..f3988b31df3a2 100644
--- a/clang/test/CXX/dcl.dcl/p4-0x.cpp
+++ b/clang/test/CXX/dcl.dcl/p4-0x.cpp
@@ -18,4 +18,4 @@ static_assert(S(false), "not so fast"); // expected-error 
{{not so fast}}
 static_assert(T(), "");
 static_assert(U(), ""); // expected-error {{ambiguous}}
 
-static_assert(false, L"\x14hi" "!" R"x(")x"); // expected-error 
{{static_assert failed L"\024hi!\""}}
+static_assert(false, L"\x14hi" "!" R"x(")x"); // expected-error 
{{static_assert failed: L"\024hi!\""}}

diff  --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp 
b/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
index 30ec2a3ab70f7..ed26bcbf6b944 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
@@ -164,7 +164,7 @@ static_assert(Large<small>);
 // expected-error@-1 {{static_assert failed}}
 // expected-note@-2 {{because 'small' does not satisfy 'Large'}}
 static_assert(Large<small>, "small isn't large");
-// expected-error@-1 {{static_assert failed "small isn't large"}}
+// expected-error@-1 {{static_assert failed: small isn't large}}
 // expected-note@-2 {{because 'small' does not satisfy 'Large'}}
 
 // Make sure access-checking can fail a concept specialization

diff  --git a/clang/test/PCH/cxx-static_assert.cpp 
b/clang/test/PCH/cxx-static_assert.cpp
index 4946b76381d94..d2cf8926a88f0 100644
--- a/clang/test/PCH/cxx-static_assert.cpp
+++ b/clang/test/PCH/cxx-static_assert.cpp
@@ -17,7 +17,7 @@ template<int N> struct T {
 
 #else
 
-// expected-error@15 {{static_assert failed due to requirement '1 == 2' "N is 
not 2!"}}
+// expected-error@15 {{static_assert failed due to requirement '1 == 2': N is 
not 2!}}
 T<1> t1; // expected-note {{in instantiation of template class 'T<1>' 
requested here}}
 T<2> t2;
 

diff  --git a/clang/test/Sema/static-assert.c b/clang/test/Sema/static-assert.c
index 5630bde64f935..3958aeaaa77e7 100644
--- a/clang/test/Sema/static-assert.c
+++ b/clang/test/Sema/static-assert.c
@@ -9,7 +9,7 @@ _Static_assert("foo", "string is nonzero"); // ext-warning 
{{'_Static_assert' is
 #endif
 
 _Static_assert(1, "1 is nonzero"); // ext-warning {{'_Static_assert' is a C11 
extension}}
-_Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed "0 
is nonzero"}} \
+_Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed: 0 
is nonzero}} \
                                    // ext-warning {{'_Static_assert' is a C11 
extension}}
 
 #ifdef MS
@@ -18,7 +18,7 @@ static_assert(1, "1 is nonzero"); // ms-warning {{use of 
'static_assert' without
 
 void foo(void) {
   _Static_assert(1, "1 is nonzero"); // ext-warning {{'_Static_assert' is a 
C11 extension}}
-  _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed 
"0 is nonzero"}} \
+  _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed: 
0 is nonzero}} \
                                      // ext-warning {{'_Static_assert' is a 
C11 extension}}
 #ifdef MS
   static_assert(1, "1 is nonzero"); // ms-warning {{use of 'static_assert' 
without}}
@@ -31,7 +31,7 @@ _Static_assert(1, invalid); // expected-error {{expected 
string literal for diag
 struct A {
   int a;
   _Static_assert(1, "1 is nonzero"); // ext-warning {{'_Static_assert' is a 
C11 extension}}
-  _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed 
"0 is nonzero"}} \
+  _Static_assert(0, "0 is nonzero"); // expected-error {{static_assert failed: 
0 is nonzero}} \
                                      // ext-warning {{'_Static_assert' is a 
C11 extension}}
 #ifdef MS
   static_assert(1, "1 is nonzero"); // ms-warning {{use of 'static_assert' 
without}}
@@ -54,7 +54,7 @@ struct A {
 
 typedef UNION(unsigned, struct A) U1; // ext-warning 3 {{'_Static_assert' is a 
C11 extension}}
 UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; // ext-warning 3 
{{'_Static_assert' is a C11 extension}} cxx-warning {{designated initializers 
are a C++20 extension}}
-typedef UNION(char, short) U3; // expected-error {{static_assert failed due to 
requirement 'sizeof(char) == sizeof(short)' "type size mismatch"}} \
+typedef UNION(char, short) U3; // expected-error {{static_assert failed due to 
requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \
                                // ext-warning 3 {{'_Static_assert' is a C11 
extension}}
 typedef UNION(float, 0.5f) U4; // expected-error {{expected a type}} \
                                // ext-warning 3 {{'_Static_assert' is a C11 
extension}}

diff  --git a/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp 
b/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp
index 68eae7f69c783..a3a38d42818b7 100644
--- a/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp
+++ b/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp
@@ -19,4 +19,4 @@ template<typename T> false_type test(...);
 template<typename T>
 static const auto has_minus_assign = decltype(test<T>())::value;
 
-static_assert(has_minus_assign<int*>, "failed"); // expected-error 
{{static_assert failed due to requirement 'has_minus_assign<int *>' "failed"}}
+static_assert(has_minus_assign<int*>, "failed"); // expected-error 
{{static_assert failed due to requirement 'has_minus_assign<int *>': failed}}

diff  --git a/clang/test/SemaCXX/static-assert.cpp 
b/clang/test/SemaCXX/static-assert.cpp
index f6ac64b49d95d..5801320f305da 100644
--- a/clang/test/SemaCXX/static-assert.cpp
+++ b/clang/test/SemaCXX/static-assert.cpp
@@ -4,50 +4,50 @@ int f(); // expected-note {{declared here}}
 
 static_assert(f(), "f"); // expected-error {{static_assert expression is not 
an integral constant expression}} expected-note {{non-constexpr function 'f' 
cannot be used in a constant expression}}
 static_assert(true, "true is not false");
-static_assert(false, "false is false"); // expected-error {{static_assert 
failed "false is false"}}
+static_assert(false, "false is false"); // expected-error {{static_assert 
failed: false is false}}
 
 void g() {
-    static_assert(false, "false is false"); // expected-error {{static_assert 
failed "false is false"}}
+    static_assert(false, "false is false"); // expected-error {{static_assert 
failed: false is false}}
 }
 
 class C {
-    static_assert(false, "false is false"); // expected-error {{static_assert 
failed "false is false"}}
+    static_assert(false, "false is false"); // expected-error {{static_assert 
failed: false is false}}
 };
 
 template<int N> struct T {
-    static_assert(N == 2, "N is not 2!"); // expected-error {{static_assert 
failed due to requirement '1 == 2' "N is not 2!"}}
+    static_assert(N == 2, "N is not 2!"); // expected-error {{static_assert 
failed due to requirement '1 == 2': N is not 2!}}
 };
 
 T<1> t1; // expected-note {{in instantiation of template class 'T<1>' 
requested here}}
 T<2> t2;
 
 template<typename T> struct S {
-    static_assert(sizeof(T) > sizeof(char), "Type not big enough!"); // 
expected-error {{static_assert failed due to requirement 'sizeof(char) > 
sizeof(char)' "Type not big enough!"}}
+    static_assert(sizeof(T) > sizeof(char), "Type not big enough!"); // 
expected-error {{static_assert failed due to requirement 'sizeof(char) > 
sizeof(char)': Type not big enough!}}
 };
 
 S<char> s1; // expected-note {{in instantiation of template class 'S<char>' 
requested here}}
 S<int> s2;
 
-static_assert(false, L"\xFFFFFFFF"); // expected-error {{static_assert failed 
L"\xFFFFFFFF"}}
-static_assert(false, u"\U000317FF"); // expected-error {{static_assert failed 
u"\U000317FF"}}
+static_assert(false, L"\xFFFFFFFF"); // expected-error {{static_assert failed: 
L"\xFFFFFFFF"}}
+static_assert(false, u"\U000317FF"); // expected-error {{static_assert failed: 
u"\U000317FF"}}
 
-static_assert(false, u8"Ω"); // expected-error {{static_assert failed 
u8"\316\251"}}
-static_assert(false, L"\u1234"); // expected-error {{static_assert failed 
L"\x1234"}}
-static_assert(false, L"\x1ff" "0\x123" "fx\xfffff" "goop"); // expected-error 
{{static_assert failed L"\x1FF""0\x123""fx\xFFFFFgoop"}}
+static_assert(false, u8"Ω"); // expected-error {{static_assert failed: 
u8"\316\251"}}
+static_assert(false, L"\u1234"); // expected-error {{static_assert failed: 
L"\x1234"}}
+static_assert(false, L"\x1ff" "0\x123" "fx\xfffff" "goop"); // expected-error 
{{static_assert failed: L"\x1FF""0\x123""fx\xFFFFFgoop"}}
 
 static_assert(false, R"(a
 \tb
 c
-)"); // expected-error@-3 {{static_assert failed "a\n\tb\nc\n"}}
+)"); // expected-error@-3 {{static_assert failed: a\n\tb\nc\n}}
 
 static_assert(false, 
"\u0080\u0081\u0082\u0083\u0099\u009A\u009B\u009C\u009D\u009E\u009F");
-// expected-error@-1 {{static_assert failed 
"<U+0080><U+0081><U+0082><U+0083><U+0099><U+009A><U+009B><U+009C><U+009D><U+009E><U+009F>"}}
+// expected-error@-1 {{static_assert failed: 
<U+0080><U+0081><U+0082><U+0083><U+0099><U+009A><U+009B><U+009C><U+009D><U+009E><U+009F>}}
 
 //! Contains RTL/LTR marks
-static_assert(false, "\u200Eabc\u200Fdef\u200Fgh"); // expected-error 
{{static_assert failed "‎abc‏def‏gh"}}
+static_assert(false, "\u200Eabc\u200Fdef\u200Fgh"); // expected-error 
{{static_assert failed: ‎abc‏def‏gh}}
 
 //! Contains ZWJ/regional indicators
-static_assert(false, "🏳️‍🌈 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🇪🇺"); // expected-error {{static_assert 
failed "🏳️‍🌈 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🇪🇺"}}
+static_assert(false, "🏳️‍🌈 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🇪🇺"); // expected-error {{static_assert 
failed: 🏳️‍🌈 🏴󠁧󠁢󠁥󠁮󠁧󠁿 🇪🇺}}
 
 template<typename T> struct AlwaysFails {
   // Only give one error here.
@@ -81,7 +81,7 @@ template<typename T> struct second_trait {
   static const bool value = false;
 };
 
-static_assert(first_trait<X>::value && second_trait<X>::value, "message"); // 
expected-error{{static_assert failed due to requirement 
'second_trait<X>::value' "message"}}
+static_assert(first_trait<X>::value && second_trait<X>::value, "message"); // 
expected-error{{static_assert failed due to requirement 
'second_trait<X>::value': message}}
 
 namespace std {
 
@@ -125,29 +125,29 @@ struct ExampleTypes {
 };
 
 static_assert(std::is_same<ExampleTypes::T, ExampleTypes::U>::value, 
"message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_same<int, float>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_same<int, float>::value': message}}
 static_assert(std::is_const<ExampleTypes::T>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value': message}}
 static_assert(!std::is_const<const ExampleTypes::T>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'!std::is_const<const int>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'!std::is_const<const int>::value': message}}
 static_assert(!(std::is_const<const ExampleTypes::T>::value), "message");
-// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>::value)' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>::value)': message}}
 static_assert(std::is_const<const ExampleTypes::T>::value == false, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<const int>::value == false' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<const int>::value == false': message}}
 static_assert(!(std::is_const<const ExampleTypes::T>::value == true), 
"message");
-// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>::value == true)' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>::value == true)': message}}
 static_assert(std::is_const<ExampleTypes::T>(), "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>()' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>()': message}}
 static_assert(!(std::is_const<const ExampleTypes::T>()()), "message");
-// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>()())' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'!(std::is_const<const int>()())': message}}
 static_assert(std::is_same<decltype(std::is_const<const ExampleTypes::T>()), 
int>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_same<std::is_const<const int>, int>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_same<std::is_const<const int>, int>::value': message}}
 static_assert(std::is_const<decltype(ExampleTypes::T(3))>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value': message}}
 static_assert(std::is_const<decltype(ExampleTypes::T())>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<int>::value': message}}
 static_assert(std::is_const<decltype(ExampleTypes(3))>::value, "message");
-// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<ExampleTypes>::value' "message"}}
+// expected-error@-1{{static_assert failed due to requirement 
'std::is_const<ExampleTypes>::value': message}}
 
 struct BI_tag {};
 struct RAI_tag : BI_tag {};
@@ -160,7 +160,7 @@ struct MyContainer {
 template <class Container>
 void foo() {
   static_assert(std::is_same<RAI_tag, typename 
Container::iterator::tag>::value, "message");
-  // expected-error@-1{{static_assert failed due to requirement 
'std::is_same<RAI_tag, BI_tag>::value' "message"}}
+  // expected-error@-1{{static_assert failed due to requirement 
'std::is_same<RAI_tag, BI_tag>::value': message}}
 }
 template void foo<MyContainer>();
 // expected-note@-1{{in instantiation of function template specialization 
'foo<MyContainer>' requested here}}
@@ -178,7 +178,7 @@ struct NestedTemplates1 {
 template <typename T, typename U, int a>
 void foo2() {
   static_assert(::ns::NestedTemplates1<T, a>::NestedTemplates2::template 
NestedTemplates3<U>::value, "message");
-  // expected-error@-1{{static_assert failed due to requirement 
'::ns::NestedTemplates1<int, 
3>::NestedTemplates2::NestedTemplates3<float>::value' "message"}}
+  // expected-error@-1{{static_assert failed due to requirement 
'::ns::NestedTemplates1<int, 
3>::NestedTemplates2::NestedTemplates3<float>::value': message}}
 }
 template void foo2<int, float, 3>();
 // expected-note@-1{{in instantiation of function template specialization 
'foo2<int, float, 3>' requested here}}
@@ -186,9 +186,9 @@ template void foo2<int, float, 3>();
 template <class T>
 void foo3(T t) {
   static_assert(std::is_const<T>::value, "message");
-  // expected-error-re@-1{{static_assert failed due to requirement 
'std::is_const<(lambda at 
{{.*}}static-assert.cpp:{{[0-9]*}}:{{[0-9]*}})>::value' "message"}}
+  // expected-error-re@-1{{static_assert failed due to requirement 
'std::is_const<(lambda at 
{{.*}}static-assert.cpp:{{[0-9]*}}:{{[0-9]*}})>::value': message}}
   static_assert(std::is_const<decltype(t)>::value, "message");
-  // expected-error-re@-1{{static_assert failed due to requirement 
'std::is_const<(lambda at 
{{.*}}static-assert.cpp:{{[0-9]*}}:{{[0-9]*}})>::value' "message"}}
+  // expected-error-re@-1{{static_assert failed due to requirement 
'std::is_const<(lambda at 
{{.*}}static-assert.cpp:{{[0-9]*}}:{{[0-9]*}})>::value': message}}
 }
 void callFoo3() {
   foo3([]() {});

diff  --git 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
index a96f909180f62..6c4ac602ce729 100644
--- 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
+++ 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
@@ -46,12 +46,12 @@ void pointer_to_incomplete_type() {
 void function_pointer() {
   {
     volatile std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_add(&fun, 0);
   }
   {
     std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_add(&fun, 0);
   }
 }

diff  --git 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp
 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp
index 530a8553cfef0..bb45929a5041c 100644
--- 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp
+++ 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add_explicit.verify.cpp
@@ -49,12 +49,12 @@ void pointer_to_incomplete_type() {
 void function_pointer() {
   {
     volatile std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed);
   }
   {
     std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed);
   }
 }

diff  --git 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp
 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp
index a58d7b3e43410..f996110f4977f 100644
--- 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp
+++ 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub.verify.cpp
@@ -46,12 +46,12 @@ void pointer_to_incomplete_type() {
 void function_pointer() {
   {
     volatile std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_sub(&fun, 0);
   }
   {
     std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_sub(&fun, 0);
   }
 }

diff  --git 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp
 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp
index a2fd0d5cc9ddd..97416428433d4 100644
--- 
a/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp
+++ 
b/libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_sub_explicit.verify.cpp
@@ -49,12 +49,12 @@ void pointer_to_incomplete_type() {
 void function_pointer() {
   {
     volatile std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed);
   }
   {
     std::atomic<void (*)(int)> fun;
-    // expected-error@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value' "Pointer to function isn't allowed"}}
+    // expected-error-re@atomic:* {{static_assert failed due to requirement 
'!is_function<void (int)>::value'{{.*}}Pointer to function isn't allowed}}
     std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed);
   }
 }

diff  --git 
a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
 
b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
index f11f03b0fad04..1615cc9869e7d 100644
--- 
a/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
+++ 
b/libcxx/test/libcxx/input.output/file.streams/fstreams/filebuf/traits_mismatch.fail.cpp
@@ -18,7 +18,7 @@
 int main(int, char**)
 {
        std::basic_filebuf<char, std::char_traits<wchar_t> > f;
-//  expected-error-re@streambuf:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
+//  expected-error-re@streambuf:* {{static_assert 
failed{{.*}}traits_type::char_type must be the same type as CharT}}
 
   return 0;
 }

diff  --git 
a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
 
b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
index addaacd38a6bc..b8475f193c857 100644
--- 
a/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
+++ 
b/libcxx/test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
@@ -18,8 +18,8 @@
 int main(int, char**)
 {
        std::basic_fstream<char, std::char_traits<wchar_t> > f;
-//  expected-error-re@ios:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
-//  expected-error-re@streambuf:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
+//  expected-error-re@ios:* {{static_assert failed{{.*}}traits_type::char_type 
must be the same type as CharT}}
+//  expected-error-re@streambuf:* {{static_assert 
failed{{.*}}traits_type::char_type must be the same type as CharT}}
 
 // FIXME: As of commit r324062 Clang incorrectly generates a diagnostic about 
mismatching
 // exception specifications for types which are already invalid for one reason 
or another.

diff  --git 
a/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp
 
b/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp
index 9d109eeb2a7c1..55998289eb834 100644
--- 
a/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp
+++ 
b/libcxx/test/libcxx/input.output/iostream.format/input.streams/traits_mismatch.fail.cpp
@@ -25,7 +25,7 @@ struct test_istream
 
 int main(int, char**)
 {
-//  expected-error-re@ios:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
+//  expected-error-re@ios:* {{static_assert failed{{.*}}traits_type::char_type 
must be the same type as CharT}}
 
   return 0;
 }

diff  --git 
a/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
 
b/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
index 0079349783a75..54878a2c9972f 100644
--- 
a/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
+++ 
b/libcxx/test/libcxx/input.output/iostream.format/output.streams/traits_mismatch.fail.cpp
@@ -25,7 +25,7 @@ struct test_ostream
 
 int main(int, char**)
 {
-//  expected-error-re@ios:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
+//  expected-error-re@ios:* {{static_assert failed{{.*}}traits_type::char_type 
must be the same type as CharT}}
 
   return 0;
 }

diff  --git 
a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp 
b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
index 29b56726d1093..a0df8bb4cd01c 100644
--- a/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
+++ b/libcxx/test/libcxx/input.output/string.streams/traits_mismatch.fail.cpp
@@ -21,8 +21,8 @@
 int main(int, char**)
 {
        std::basic_stringbuf<char, std::char_traits<wchar_t> > sb;
-//  expected-error-re@streambuf:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
-//  expected-error-re@string:* {{static_assert failed{{.*}} 
"traits_type::char_type must be the same type as CharT"}}
+//  expected-error-re@streambuf:* {{static_assert 
failed{{.*}}traits_type::char_type must be the same type as CharT}}
+//  expected-error-re@string:* {{static_assert 
failed{{.*}}traits_type::char_type must be the same type as CharT}}
 
   return 0;
 }

diff  --git 
a/libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
 
b/libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
index e4231217ec544..564831fff4c7a 100644
--- 
a/libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
+++ 
b/libcxx/test/libcxx/iterators/predef.iterators/reverse.iterators/bad_template_argument.verify.cpp
@@ -18,7 +18,7 @@
 
 int main(int, char**) {
   using BadIter = std::reverse_iterator<forward_iterator<int*>>;
-  BadIter i; //expected-error-re@*:* {{static_assert failed{{.*}} 
"reverse_iterator<It> requires It to be a bidirectional iterator."}}
+  BadIter i; //expected-error-re@*:* {{static_assert 
failed{{.*}}reverse_iterator<It> requires It to be a bidirectional iterator.}}
 
   return 0;
 }

diff  --git 
a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
 
b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
index 4ee0188d247c9..44824c3c140ce 100644
--- 
a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
+++ 
b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.fail.cpp
@@ -45,7 +45,7 @@ int main(int, char**) {
     SPtr<3> s3(nullptr, Deleter{}); // OK
   }
 
-  // expected-error-re@*:* {{static_assert failed{{.*}} "default_delete cannot 
be instantiated for function types"}}
+  // expected-error-re@*:* {{static_assert failed{{.*}}default_delete cannot 
be instantiated for function types}}
   std::default_delete<FnType<5>> deleter{}; // expected-note {{requested here}}
 
   return 0;

diff  --git 
a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp
 
b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp
index a62d8a5833567..2586c32ca80ec 100644
--- 
a/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp
+++ 
b/libcxx/test/libcxx/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.fail.cpp
@@ -42,7 +42,7 @@ void F(typename CannotDeduce<std::tuple<Args...>>::type 
const&) {}
 int main(int, char**) {
 #if TEST_HAS_BUILTIN_IDENTIFIER(__reference_binds_to_temporary)
   // Test that we emit our diagnostic from the library.
-  // expected-error@tuple:* 8 {{"Attempted construction of reference element 
binds to a temporary whose lifetime has ended"}}
+  // expected-error@tuple:* 8 {{Attempted construction of reference element 
binds to a temporary whose lifetime has ended}}
 
   // Good news everybody! Clang now diagnoses this for us!
   // expected-error@tuple:* 0+ {{reference member '__value_' binds to a 
temporary object whose lifetime would be shorter than the lifetime of the 
constructed object}}

diff  --git 
a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
 
b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
index bce2c6fdfc228..5e7b99b8fa16a 100644
--- 
a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
+++ 
b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp
@@ -19,7 +19,7 @@ int main(int, char**)
     {
     typedef std::pair<int, double> P;
     std::tuple_element<2, P>::type foo; // expected-note {{requested here}}
-        // expected-error-re@*:* {{static_assert failed{{( due to requirement 
'2U[L]{0,2} < 2')?}} "Index out of bounds in std::tuple_element<std::pair<T1, 
T2>>"}}
+        // expected-error-re@*:* {{static_assert failed{{( due to requirement 
'2U[L]{0,2} < 2')?}}{{.*}}Index out of bounds in 
std::tuple_element<std::pair<T1, T2>>}}
     }
 
   return 0;

diff  --git 
a/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
 
b/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
index 3e54c02c53fd9..5473e65d90941 100644
--- 
a/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
+++ 
b/libcxx/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
@@ -30,7 +30,7 @@ int main(int, char**)
     {
         typedef std::variant<int, double> T;
         std::variant_alternative<2, T>::type foo; // expected-note {{requested 
here}}
-        // expected-error-re@variant:* {{static_assert failed{{( due to 
requirement '2U[L]{0,2} < sizeof...\(_Types\)')?}} "Index out of bounds in 
std::variant_alternative<>"}}
+        // expected-error-re@variant:* {{static_assert failed{{( due to 
requirement '2U[L]{0,2} < sizeof...\(_Types\)')?}}{{.*}}Index out of bounds in 
std::variant_alternative<>}}
     }
 
   return 0;

diff  --git 
a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
 
b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
index 4f184d4738df1..3e21576afc853 100644
--- 
a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
+++ 
b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
@@ -33,7 +33,7 @@ template <class PopulationIterator, class SampleIterator> 
void test() {
 }
 
 int main(int, char**) {
-  // expected-error-re@*:* {{static_assert failed{{( due to requirement 
'.*')?}} "SampleIterator must meet the requirements of RandomAccessIterator"}}
+  // expected-error-re@*:* {{static_assert failed{{( due to requirement 
'.*')?}}{{.*}}SampleIterator must meet the requirements of 
RandomAccessIterator}}
   // expected-error@*:* 2 {{does not provide a subscript operator}}
   // expected-error@*:* {{invalid operands}}
   test<cpp17_input_iterator<int *>, cpp17_output_iterator<int *> >();

diff  --git 
a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
 
b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
index 93a13bd8f39be..b6693781e2a7f 100644
--- 
a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
+++ 
b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp
@@ -21,15 +21,15 @@ int main(int, char**) {
   const int *b = std::begin(arr), *e = std::end(arr);
   typedef cpp17_input_iterator<const int*> Iter;
   {
-    // expected-error@*:* {{"std::min_element requires a ForwardIterator"}}
+    // expected-error@*:* {{std::min_element requires a ForwardIterator}}
     std::min_element(Iter(b), Iter(e));
   }
   {
-    // expected-error@*:* {{"std::max_element requires a ForwardIterator"}}
+    // expected-error@*:* {{std::max_element requires a ForwardIterator}}
     std::max_element(Iter(b), Iter(e));
   }
   {
-    // expected-error@*:* {{"std::minmax_element requires a ForwardIterator"}}
+    // expected-error@*:* {{std::minmax_element requires a ForwardIterator}}
     std::minmax_element(Iter(b), Iter(e));
   }
 

diff  --git 
a/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp 
b/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp
index a9b730caf261e..ab77167c37418 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/deduct.fail.cpp
@@ -63,7 +63,7 @@ int main(int, char**)
         // refuse to rebind the allocator if Allocator::value_type is not 
exactly what we expect
         const P arr[] = { {1,1L}, {2,2L}, {3,3L} };
         std::map m(arr, arr + 3, std::allocator<P>());
-            // expected-error-re@map:* {{static_assert failed{{( due to 
requirement '.*')?}} "Allocator::value_type must be same type as value_type"}}
+            // expected-error-re@map:* {{static_assert failed{{( due to 
requirement '.*')?}}{{.*}}Allocator::value_type must be same type as 
value_type}}
     }
     {
         // cannot convert from some arbitrary unrelated type

diff  --git 
a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp 
b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp
index 4f324990bbfc4..47d32d7e1f4c1 100644
--- 
a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp
+++ 
b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.fail.cpp
@@ -63,7 +63,7 @@ int main(int, char**)
         // refuse to rebind the allocator if Allocator::value_type is not 
exactly what we expect
         const P arr[] = { {1,1L}, {2,2L}, {3,3L} };
         std::multimap m(arr, arr + 3, std::allocator<P>());
-            // expected-error-re@map:* {{static_assert failed{{( due to 
requirement '.*')?}} "Allocator::value_type must be same type as value_type"}}
+            // expected-error-re@map:* {{static_assert failed{{( due to 
requirement '.*')?}}{{.*}}Allocator::value_type must be same type as 
value_type}}
     }
     {
         // cannot convert from some arbitrary unrelated type

diff  --git 
a/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp 
b/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp
index e0f7a6fef7916..9aea551dc6536 100644
--- a/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp
+++ b/libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp
@@ -18,7 +18,7 @@ int main(int, char**) {
     typedef double T;
     typedef std::array<const T, 0> C;
     C c = {};
-    // expected-error-re@array:* {{static_assert failed {{.*}}"cannot fill 
zero-sized array of type 'const T'"}}
+    // expected-error-re@array:* {{static_assert failed{{.*}}cannot fill 
zero-sized array of type 'const T'}}
     c.fill(5.5); // expected-note {{requested here}}
   }
 

diff  --git 
a/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp 
b/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp
index 4c51d2401c4a8..d7726164d4b22 100644
--- a/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp
+++ b/libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp
@@ -19,7 +19,7 @@ int main(int, char**) {
     typedef std::array<const T, 0> C;
     C c = {};
     C c2 = {};
-    // expected-error-re@array:* {{static_assert failed {{.*}}"cannot swap 
zero-sized array of type 'const T'"}}
+    // expected-error-re@array:* {{static_assert failed{{.*}}cannot swap 
zero-sized array of type 'const T'}}
     c.swap(c2); // expected-note {{requested here}}
   }
 

diff  --git 
a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp 
b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp
index bd4dfd8d9238f..cd74522c92ce6 100644
--- a/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp
+++ b/libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp
@@ -25,7 +25,7 @@ int main(int, char**)
         typedef std::array<T, 3> C;
         C c = {1, 2, 3.5};
         std::get<3>(c) = 5.5; // expected-note {{requested here}}
-        // expected-error-re@array:* {{static_assert failed{{( due to 
requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in std::get<> 
(std::array)"}}
+        // expected-error-re@array:* {{static_assert failed{{( due to 
requirement '3U[L]{0,2} < 3U[L]{0,2}')?}}{{.*}}Index out of bounds in 
std::get<> (std::array)}}
     }
 
   return 0;

diff  --git 
a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp 
b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
index 84bc03816d0b4..26360790bf4df 100644
--- 
a/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
+++ 
b/libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
@@ -19,7 +19,7 @@ int main(int, char**)
         typedef double T;
         typedef std::array<T, 3> C;
         std::tuple_element<3, C> foo; // expected-note {{requested here}}
-        // expected-error-re@array:* {{static_assert failed{{( due to 
requirement '3U[L]{0,2} < 3U[L]{0,2}')?}} "Index out of bounds in 
std::tuple_element<> (std::array)"}}
+        // expected-error-re@array:* {{static_assert failed{{( due to 
requirement '3U[L]{0,2} < 3U[L]{0,2}')?}}{{.*}}Index out of bounds in 
std::tuple_element<> (std::array)}}
     }
 
   return 0;

diff  --git 
a/libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
 
b/libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
index 0ee39f3332b20..99f28ff4f27e8 100644
--- 
a/libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
+++ 
b/libcxx/test/std/containers/sequences/vector/vector.modifiers/resize_not_move_insertable.fail.cpp
@@ -29,7 +29,7 @@ class BadUserNoCookie {
 };
 
 int main(int, char**) {
-  // expected-error@* 2 {{"The specified type does not meet the requirements 
of Cpp17MoveInsertable"}}
+  // expected-error@* 2 {{The specified type does not meet the requirements of 
Cpp17MoveInsertable}}
 
   // Other diagnostics that might be seen as Clang tries to continue compiling:
   // expected-error@* 0-2 {{call to deleted constructor}}

diff  --git 
a/libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp 
b/libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
index 8ba6c8a214a9c..1e58162febf05 100644
--- a/libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
@@ -27,14 +27,14 @@ void f() {
   std::span<const int, 4> sp(array);
 
   //  Offset too large templatized
-  [[maybe_unused]] auto s1 = sp.subspan<5>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset out of range"}}
+  [[maybe_unused]] auto s1 = sp.subspan<5>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset out of range}}
 
   //  Count too large templatized
-  [[maybe_unused]] auto s2 = sp.subspan<0, 5>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset + Count out of range"}}
+  [[maybe_unused]] auto s2 = sp.subspan<0, 5>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset + Count out of range}}
 
   //  Offset + Count too large templatized
-  [[maybe_unused]] auto s3 = sp.subspan<2, 3>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset + Count out of range"}}
+  [[maybe_unused]] auto s3 = sp.subspan<2, 3>(); // expected-error@span:* 
{{span<T, N>::subspan<Offset, Count>(): Offset + Count out of range}}
 
   //  Offset + Count overflow templatized
-  [[maybe_unused]] auto s4 = sp.subspan<3, std::size_t(-2)>(); // 
expected-error@span:* {{span<T, N>::subspan<Offset, Count>(): Offset + Count 
out of range"}}, expected-error-re@span:* {{array is too large{{(.* 
elements)}}}}
+  [[maybe_unused]] auto s4 = sp.subspan<3, std::size_t(-2)>(); // 
expected-error@span:* {{span<T, N>::subspan<Offset, Count>(): Offset + Count 
out of range}}, expected-error-re@span:* {{array is too large{{(.* elements)}}}}
 }

diff  --git 
a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
 
b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
index 95e4940cc6561..8a9a64ef1b418 100644
--- 
a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
+++ 
b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.fail.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
   }
   {
     using H = coro::coroutine_handle<int>;
-    // expected-error@experimental/coroutine:* 1 {{static_assert failed 
"coroutine_handle<promise_type>::from_address cannot be used with pointers to 
the coroutine's promise type; use 'from_promise' instead"}}
+    // expected-error-re@experimental/coroutine:* 1 {{static_assert 
failed{{.*}}coroutine_handle<promise_type>::from_address cannot be used with 
pointers to the coroutine's promise type; use 'from_promise' instead}}
     H::from_address((const char*)nullptr); // expected-note {{requested here}}
     // expected-error@experimental/coroutine:* 1 
{{coroutine_handle<promise_type>::from_address cannot be called with non-void 
pointers}}
     H::from_address((int*)nullptr); // expected-note {{requested here}}

diff  --git 
a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp
 
b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp
index fca6b37d7e234..396053c8d78ba 100644
--- 
a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp
+++ 
b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp
@@ -26,10 +26,10 @@ int main(int, char**)
     (void) std::launder((               void *) nullptr);
     (void) std::launder((const          void *) nullptr);
     (void) std::launder((      volatile void *) nullptr);
-    (void) std::launder((const volatile void *) nullptr);  // 
expected-error-re@new:* 4 {{static_assert failed{{.*}} "can't launder cv-void"}}
+    (void) std::launder((const volatile void *) nullptr);  // 
expected-error-re@new:* 4 {{static_assert failed{{.*}}can't launder cv-void}}
     // expected-error@new:* 0-4 {{void pointer argument to '__builtin_launder' 
is not allowed}}
 
-    (void) std::launder(foo);                              // 
expected-error-re@new:* 1 {{static_assert failed{{.*}} "can't launder 
functions"}}
+    (void) std::launder(foo);                              // 
expected-error-re@new:* 1 {{static_assert failed{{.*}}can't launder functions}}
     // expected-error@new:* 0-1 {{function pointer argument to 
'__builtin_launder' is not allowed}}
 
   return 0;

diff  --git a/libcxx/test/std/numerics/numbers/illformed.verify.cpp 
b/libcxx/test/std/numerics/numbers/illformed.verify.cpp
index ca1ca78d969de..85e8f2dcb7cda 100644
--- a/libcxx/test/std/numerics/numbers/illformed.verify.cpp
+++ b/libcxx/test/std/numerics/numbers/illformed.verify.cpp
@@ -12,7 +12,7 @@
 
 // Initializing the primary template is ill-formed.
 int log2e{std::numbers::log2e_v<
-    int>}; // expected-error-re@numbers:* {{static_assert failed {{.*}} "A 
program that instantiates a primary template of a mathematical constant 
variable template is ill-formed."}}
+    int>}; // expected-error-re@numbers:* {{static_assert failed{{.*}}A 
program that instantiates a primary template of a mathematical constant 
variable template is ill-formed.}}
 int log10e{std::numbers::log10e_v<int>};
 int pi{std::numbers::pi_v<int>};
 int inv_pi{std::numbers::inv_pi_v<int>};

diff  --git 
a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp 
b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp
index 2f8bc7565e20e..c8df9927b0725 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp
@@ -19,12 +19,12 @@ int main(int, char**)
 {
     typedef unsigned long long T;
 
-    // expected-error@*:* {{static_assert failed due to requirement '1ULL == 0 
|| 1ULL < 1ULL' "linear_congruential_engine invalid parameters"}}
+    // expected-error-re@*:* {{static_assert failed due to requirement '1ULL 
== 0 || 1ULL < 1ULL'{{.*}}linear_congruential_engine invalid parameters}}
     std::linear_congruential_engine<T, 0, 0, 0> e2;
-    // expected-error@*:* {{static_assert failed due to requirement '1ULL == 0 
|| 1ULL < 1ULL' "linear_congruential_engine invalid parameters"}}
+    // expected-error-re@*:* {{static_assert failed due to requirement '1ULL 
== 0 || 1ULL < 1ULL'{{.*}}linear_congruential_engine invalid parameters}}
     std::linear_congruential_engine<T, 0, 1, 1> e3;
     std::linear_congruential_engine<T, 1, 0, 1> e4;
-    // expected-error@*:* {{static_assert failed due to requirement 
'is_unsigned<int>::value' "_UIntType must be unsigned type"}}
+    // expected-error-re@*:* {{static_assert failed due to requirement 
'is_unsigned<int>::value'{{.*}}_UIntType must be unsigned type}}
     std::linear_congruential_engine<int, 0, 0, 0> e5;
 
     return 0;

diff  --git a/libcxx/test/std/strings/basic.string/char.bad.verify.cpp 
b/libcxx/test/std/strings/basic.string/char.bad.verify.cpp
index 0eab73a6de477..a3ab207f420a1 100644
--- a/libcxx/test/std/strings/basic.string/char.bad.verify.cpp
+++ b/libcxx/test/std/strings/basic.string/char.bad.verify.cpp
@@ -32,20 +32,20 @@ void f() {
         typedef char C[3];
         static_assert(std::is_array<C>::value, "");
         std::basic_string<C, test_traits<C> > s;
-        // expected-error-re@string:* {{static_assert failed{{.*}} "Character 
type of basic_string must not be an array"}}
+        // expected-error-re@string:* {{static_assert failed{{.*}}Character 
type of basic_string must not be an array}}
     }
 
     {
         // not trivial
         static_assert(!std::is_trivial<NotTrivial>::value, "");
         std::basic_string<NotTrivial, test_traits<NotTrivial> > s;
-        // expected-error-re@string:* {{static_assert failed{{.*}} "Character 
type of basic_string must be trivial"}}
+        // expected-error-re@string:* {{static_assert failed{{.*}}Character 
type of basic_string must be trivial}}
     }
 
     {
         // not standard layout
         static_assert(!std::is_standard_layout<NotStandardLayout>::value, "");
         std::basic_string<NotStandardLayout, test_traits<NotStandardLayout> > 
s;
-        // expected-error-re@string:* {{static_assert failed{{.*}} "Character 
type of basic_string must be standard-layout"}}
+        // expected-error-re@string:* {{static_assert failed{{.*}}Character 
type of basic_string must be standard-layout}}
     }
 }

diff  --git a/libcxx/test/std/strings/string.view/char.bad.fail.cpp 
b/libcxx/test/std/strings/string.view/char.bad.fail.cpp
index 4953e135bc721..d8b8878b19d7c 100644
--- a/libcxx/test/std/strings/string.view/char.bad.fail.cpp
+++ b/libcxx/test/std/strings/string.view/char.bad.fail.cpp
@@ -35,21 +35,21 @@ int main(int, char**)
     typedef char C[3];
     static_assert(std::is_array<C>::value, "");
     std::basic_string_view<C, test_traits<C> > sv;
-//  expected-error-re@string_view:* {{static_assert failed{{.*}} "Character 
type of basic_string_view must not be an array"}}
+//  expected-error-re@string_view:* {{static_assert failed{{.*}}Character type 
of basic_string_view must not be an array}}
     }
 
     {
 //  not trivial
     static_assert(!std::is_trivial<NotTrivial>::value, "");
     std::basic_string_view<NotTrivial, test_traits<NotTrivial> > sv;
-//  expected-error-re@string_view:* {{static_assert failed{{.*}} "Character 
type of basic_string_view must be trivial"}}
+//  expected-error-re@string_view:* {{static_assert failed{{.*}}Character type 
of basic_string_view must be trivial}}
     }
 
     {
 //  not standard layout
     static_assert(!std::is_standard_layout<NotStandardLayout>::value, "");
     std::basic_string_view<NotStandardLayout, test_traits<NotStandardLayout> > 
sv;
-//  expected-error-re@string_view:* {{static_assert failed{{.*}} "Character 
type of basic_string_view must be standard-layout"}}
+//  expected-error-re@string_view:* {{static_assert failed{{.*}}Character type 
of basic_string_view must be standard-layout}}
     }
 
   return 0;

diff  --git a/libcxx/test/std/time/time.hms/hhmmss.fail.cpp 
b/libcxx/test/std/time/time.hms/hhmmss.fail.cpp
index 5da162ed57229..c9d4788d7ad31 100644
--- a/libcxx/test/std/time/time.hms/hhmmss.fail.cpp
+++ b/libcxx/test/std/time/time.hms/hhmmss.fail.cpp
@@ -21,10 +21,10 @@ struct A {};
 
 int main(int, char**)
 {
-    std::chrono::hh_mm_ss<void> h0;        // expected-error-re@*:* 
{{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a 
std::chrono::duration"}}
-    std::chrono::hh_mm_ss<int> h1;         // expected-error-re@*:* 
{{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a 
std::chrono::duration"}}
-    std::chrono::hh_mm_ss<std::string> h2; // expected-error-re@*:* 
{{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a 
std::chrono::duration"}}
-    std::chrono::hh_mm_ss<A> h3;           // expected-error-re@*:* 
{{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a 
std::chrono::duration"}}
+    std::chrono::hh_mm_ss<void> h0;        // expected-error-re@*:* 
{{static_assert failed{{.*}}template parameter of hh_mm_ss must be a 
std::chrono::duration}}
+    std::chrono::hh_mm_ss<int> h1;         // expected-error-re@*:* 
{{static_assert failed{{.*}}template parameter of hh_mm_ss must be a 
std::chrono::duration}}
+    std::chrono::hh_mm_ss<std::string> h2; // expected-error-re@*:* 
{{static_assert failed{{.*}}template parameter of hh_mm_ss must be a 
std::chrono::duration}}
+    std::chrono::hh_mm_ss<A> h3;           // expected-error-re@*:* 
{{static_assert failed{{.*}}template parameter of hh_mm_ss must be a 
std::chrono::duration}}
 
     return 0;
 }

diff  --git 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
index cd70bbe9c3218..aa56b6d9cf25e 100644
--- 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
+++ 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp
@@ -25,12 +25,12 @@ struct TestType {};
 void test_const_lvalue_cast_request_non_const_lvalue()
 {
     const std::any a;
-    // 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}}
     // expected-error@any:* {{drops 'const' qualifier}}
     std::any_cast<TestType &>(a); // expected-note {{requested here}}
 
     const std::any a2(42);
-    // 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}}
     // expected-error@any:* {{drops 'const' qualifier}}
     std::any_cast<int&>(a2); // expected-note {{requested here}}
 }
@@ -38,22 +38,22 @@ void test_const_lvalue_cast_request_non_const_lvalue()
 void test_lvalue_any_cast_request_rvalue()
 {
     std::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}}
     std::any_cast<TestType &&>(a); // expected-note {{requested here}}
 
     std::any a2(42);
-    // 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}}
     std::any_cast<int&&>(a2); // expected-note {{requested here}}
 }
 
 void test_rvalue_any_cast_request_lvalue()
 {
     std::any a;
-    // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is 
required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re@any:* {{static_assert failed{{.*}}ValueType is 
required to be an rvalue reference or a CopyConstructible type}}
     // expected-error@any:* {{non-const lvalue reference to type 'TestType' 
cannot bind to a temporary}}
     std::any_cast<TestType &>(std::move(a)); // expected-note {{requested 
here}}
 
-    // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is 
required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re@any:* {{static_assert failed{{.*}}ValueType is 
required to be an rvalue reference or a CopyConstructible type}}
     // expected-error@any:* {{non-const lvalue reference to type 'int' cannot 
bind to a temporary}}
     std::any_cast<int&>(42);
 }

diff  --git 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
index d9d75bcc35fce..83fd47d95b515 100644
--- 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
+++ 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.verify.cpp
@@ -34,16 +34,16 @@ int main(int, char**)
 {
     std::any a;
 
-    // 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}}
     std::any_cast<TestType &>(static_cast<std::any const&>(a)); // 
expected-note {{requested here}}
 
-    // 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}}
     std::any_cast<TestType &&>(static_cast<std::any const&>(a)); // 
expected-note {{requested here}}
 
-    // 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}}
     std::any_cast<TestType2 &>(static_cast<std::any const&&>(a)); // 
expected-note {{requested here}}
 
-    // 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}}
     std::any_cast<TestType2 &&>(static_cast<std::any const&&>(a)); // 
expected-note {{requested here}}
 
   return 0;

diff  --git 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
index 7ff475b9a0f63..c3cdfe7f94586 100644
--- 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
+++ 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.verify.cpp
@@ -48,15 +48,15 @@ struct no_move {
 
 int main(int, char**) {
     std::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}}
     std::any_cast<no_copy>(static_cast<std::any&>(a)); // expected-note 
{{requested here}}
 
-    // 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}}
     std::any_cast<no_copy>(static_cast<std::any const&>(a)); // expected-note 
{{requested here}}
 
     std::any_cast<no_copy>(static_cast<std::any &&>(a)); // OK
 
-    // expected-error-re@any:* {{static_assert failed{{.*}} "ValueType is 
required to be an rvalue reference or a CopyConstructible type"}}
+    // expected-error-re@any:* {{static_assert failed{{.*}}ValueType is 
required to be an rvalue reference or a CopyConstructible type}}
     std::any_cast<no_move>(static_cast<std::any &&>(a));
 
   return 0;

diff  --git 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
index db89641a361fb..f362dd08645c6 100644
--- 
a/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
+++ 
b/libcxx/test/std/utilities/any/any.nonmembers/any.cast/reference_types.fail.cpp
@@ -22,30 +22,30 @@ int main(int, char**)
 {
     std::any a = 1;
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int &>(&a); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int &&>(&a); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int const &>(&a); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int const&&>(&a); // expected-note {{requested here}}
 
     const std::any& a2 = a;
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int &>(&a2); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int &&>(&a2); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int const &>(&a2); // expected-note {{requested here}}
 
-    // expected-error-re@any:* 1 {{static_assert failed{{.*}} "_ValueType may 
not be a reference."}}
+    // expected-error-re@any:* 1 {{static_assert failed{{.*}}_ValueType may 
not be a reference.}}
     std::any_cast<int const &&>(&a2); // expected-note {{requested here}}
 
   return 0;

diff  --git 
a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp 
b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
index 9f227757e1dee..1394ff0c9d628 100644
--- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
+++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
@@ -31,7 +31,7 @@ int main(int, char**)
 #if TEST_HAS_BUILTIN(__make_integer_seq) && 
!defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
   MakeSeqT i; // expected-error@*:* {{integer sequences must have non-negative 
sequence length}}
 #else
-  MakeSeqT i; // expected-error@*:* {{static_assert failed 
"std::make_integer_sequence must have a non-negative sequence length"}}
+  MakeSeqT i; // expected-error@*:* {{static_assert 
failed{{.*}}std::make_integer_sequence must have a non-negative sequence 
length}}
 #endif
 
   return 0;

diff  --git 
a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
 
b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
index 68087fcd9c3ed..bb2483ecd2ca0 100644
--- 
a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
+++ 
b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.fail.cpp
@@ -24,23 +24,23 @@ struct NonDestructible { ~NonDestructible() = delete; };
 int main(int, char**)
 {
        {
-       std::optional<char &> o1;               // expected-error-re@optional:* 
{{static_assert failed{{.*}} "instantiation of optional with a reference type 
is ill-formed"}}
-       std::optional<NonDestructible> o2;  // expected-error-re@optional:* 
{{static_assert failed{{.*}} "instantiation of optional with a non-destructible 
type is ill-formed"}}
-       std::optional<char[20]> o3;             // expected-error-re@optional:* 
{{static_assert failed{{.*}} "instantiation of optional with an array type is 
ill-formed"}}
+       std::optional<char &> o1;               // expected-error-re@optional:* 
{{static_assert failed{{.*}}instantiation of optional with a reference type is 
ill-formed}}
+       std::optional<NonDestructible> o2;  // expected-error-re@optional:* 
{{static_assert failed{{.*}}instantiation of optional with a non-destructible 
type is ill-formed}}
+       std::optional<char[20]> o3;             // expected-error-re@optional:* 
{{static_assert failed{{.*}}instantiation of optional with an array type is 
ill-formed}}
        }
 
        {
-       std::optional<               std::in_place_t> o1;  // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with in_place_t is ill-formed"}}
-       std::optional<const          std::in_place_t> o2;  // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with in_place_t is ill-formed"}}
-       std::optional<      volatile std::in_place_t> o3;  // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with in_place_t is ill-formed"}}
-       std::optional<const volatile std::in_place_t> o4;  // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with in_place_t is ill-formed"}}
+       std::optional<               std::in_place_t> o1;  // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with in_place_t is ill-formed}}
+       std::optional<const          std::in_place_t> o2;  // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with in_place_t is ill-formed}}
+       std::optional<      volatile std::in_place_t> o3;  // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with in_place_t is ill-formed}}
+       std::optional<const volatile std::in_place_t> o4;  // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with in_place_t is ill-formed}}
        }
 
        {
-       std::optional<               std::nullopt_t> o1;        // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with nullopt_t is ill-formed"}}
-       std::optional<const          std::nullopt_t> o2;        // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with nullopt_t is ill-formed"}}
-       std::optional<      volatile std::nullopt_t> o3;        // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with nullopt_t is ill-formed"}}
-       std::optional<const volatile std::nullopt_t> o4;        // 
expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of 
optional with nullopt_t is ill-formed"}}
+       std::optional<               std::nullopt_t> o1;        // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with nullopt_t is ill-formed}}
+       std::optional<const          std::nullopt_t> o2;        // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with nullopt_t is ill-formed}}
+       std::optional<      volatile std::nullopt_t> o3;        // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with nullopt_t is ill-formed}}
+       std::optional<const volatile std::nullopt_t> o4;        // 
expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of 
optional with nullopt_t is ill-formed}}
        }
 
        return 0;

diff  --git 
a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
 
b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
index a9ccc0b8d564f..9b28b766be444 100644
--- 
a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
+++ 
b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp
@@ -30,7 +30,7 @@ int main(int, char**)
 
     {
 //  optional(nullopt_t)
-    std::optional opt(std::nullopt);   // expected-error-re@optional:* 
{{static_assert failed{{.*}} "instantiation of optional with nullopt_t is 
ill-formed"}}
+    std::optional opt(std::nullopt);   // expected-error-re@optional:* 
{{static_assert failed{{.*}}instantiation of optional with nullopt_t is 
ill-formed}}
     }
 
   return 0;

diff  --git 
a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
 
b/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
index 1090c64c2c857..3149e5a900db8 100644
--- 
a/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
+++ 
b/libcxx/test/std/utilities/optional/optional.object/optional_requires_destructible_object.fail.cpp
@@ -25,22 +25,22 @@ int main(int, char**)
 {
     using std::optional;
     {
-        // expected-error-re@optional:* 2 {{static_assert failed{{.*}} 
"instantiation of optional with a reference type is ill-formed}}
+        // expected-error-re@optional:* 2 {{static_assert 
failed{{.*}}instantiation of optional with a reference type is ill-formed}}
         optional<int&> opt1;
         optional<int&&> opt2;
     }
     {
-        // expected-error-re@optional:* {{static_assert failed{{.*}} 
"instantiation of optional with a non-destructible type is ill-formed"}}
+        // expected-error-re@optional:* {{static_assert 
failed{{.*}}instantiation of optional with a non-destructible type is 
ill-formed}}
         optional<X> opt3;
     }
     {
-        // expected-error-re@optional:* {{static_assert failed{{.*}} 
"instantiation of optional with a non-object type is undefined behavior"}}
-        // expected-error-re@optional:* {{static_assert failed{{.*}} 
"instantiation of optional with a non-destructible type is ill-formed}}
+        // expected-error-re@optional:* {{static_assert 
failed{{.*}}instantiation of optional with a non-object type is undefined 
behavior}}
+        // expected-error-re@optional:* {{static_assert 
failed{{.*}}instantiation of optional with a non-destructible type is 
ill-formed}}
         optional<void()> opt4;
     }
     {
-        // expected-error-re@optional:* {{static_assert failed{{.*}} 
"instantiation of optional with a non-object type is undefined behavior"}}
-        // expected-error-re@optional:* {{static_assert failed{{.*}} 
"instantiation of optional with a non-destructible type is ill-formed}}
+        // expected-error-re@optional:* {{static_assert 
failed{{.*}}instantiation of optional with a non-object type is undefined 
behavior}}
+        // expected-error-re@optional:* {{static_assert 
failed{{.*}}instantiation of optional with a non-destructible type is 
ill-formed}}
         // expected-error@optional:* 1+ {{cannot form a reference to 'void'}}
         optional<const void> opt4;
     }

diff  --git 
a/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp 
b/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp
index 9485cb0e9c088..b95cb5606b5f2 100644
--- 
a/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp
+++ 
b/libcxx/test/std/utilities/optional/optional.syn/optional_in_place_t.fail.cpp
@@ -21,7 +21,7 @@ int main(int, char**)
     using std::in_place;
 
     optional<in_place_t> opt; // expected-note {{requested here}}
-    // expected-error@optional:* {{"instantiation of optional with in_place_t 
is ill-formed"}}
+    // expected-error@optional:* {{instantiation of optional with in_place_t 
is ill-formed}}
 
   return 0;
 }

diff  --git a/libcxx/test/std/utilities/utility/forward/forward.fail.cpp 
b/libcxx/test/std/utilities/utility/forward/forward.fail.cpp
index f913b835c2248..44ecddf744822 100644
--- a/libcxx/test/std/utilities/utility/forward/forward.fail.cpp
+++ b/libcxx/test/std/utilities/utility/forward/forward.fail.cpp
@@ -23,7 +23,7 @@ int main(int, char**)
 {
     {
         (void)std::forward<A&>(source());  // expected-note {{requested here}}
-        // expected-error-re@*:* 1 {{static_assert failed{{.*}} "cannot 
forward an rvalue as an lvalue"}}
+        // expected-error-re@*:* 1 {{static_assert failed{{.*}}cannot forward 
an rvalue as an lvalue}}
     }
     {
         const A ca = A();

diff  --git 
a/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp 
b/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp
index addf745110d68..eaf7e79b971e5 100644
--- a/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp
+++ b/libcxx/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp
@@ -75,7 +75,7 @@ int main(int, char**) {
   using V = std::variant<int, ComparesToMyBoolExplicit>;
   V v1(42);
   V v2(101);
-  // expected-error-re@variant:* 6 {{static_assert failed {{.*}}"the 
relational operator does not return a type which is implicitly convertible to 
bool"}}
+  // expected-error-re@variant:* 6 {{static_assert failed{{.*}}the relational 
operator does not return a type which is implicitly convertible to bool}}
   // expected-error@variant:* 6 {{no viable conversion}}
   (void)(v1 == v2); // expected-note {{here}}
   (void)(v1 != v2); // expected-note {{here}}


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to