diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -1529,9 +1529,9 @@ "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 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -16595,7 +16595,7 @@ if (AssertMessage) { const auto *MsgStr = cast(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 --- a/clang/test/C/drs/dr0xx.c +++ b/clang/test/C/drs/dr0xx.c @@ -203,7 +203,7 @@ * Note: the rule changed in C99 to be different 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 --- a/clang/test/CXX/dcl.dcl/p4-0x.cpp +++ b/clang/test/CXX/dcl.dcl/p4-0x.cpp @@ -18,4 +18,4 @@ 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 --- 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 @@ // expected-error@-1 {{static_assert failed}} // expected-note@-2 {{because 'small' does not satisfy 'Large'}} static_assert(Large, "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 --- a/clang/test/PCH/cxx-static_assert.cpp +++ b/clang/test/PCH/cxx-static_assert.cpp @@ -17,7 +17,7 @@ #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 --- a/clang/test/Sema/static-assert.c +++ b/clang/test/Sema/static-assert.c @@ -9,7 +9,7 @@ #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 @@ 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 @@ 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 @@ 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 --- a/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp +++ b/clang/test/SemaCXX/int-ptr-cast-SFINAE.cpp @@ -19,4 +19,4 @@ template static const auto has_minus_assign = decltype(test())::value; -static_assert(has_minus_assign, "failed"); // expected-error {{static_assert failed due to requirement 'has_minus_assign' "failed"}} +static_assert(has_minus_assign, "failed"); // expected-error {{static_assert failed due to requirement 'has_minus_assign': failed}} diff --git a/clang/test/SemaCXX/static-assert.cpp b/clang/test/SemaCXX/static-assert.cpp --- a/clang/test/SemaCXX/static-assert.cpp +++ b/clang/test/SemaCXX/static-assert.cpp @@ -4,50 +4,50 @@ 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 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 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 s1; // expected-note {{in instantiation of template class 'S' requested here}} S 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 ""}} +// expected-error@-1 {{static_assert failed: }} //! 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 struct AlwaysFails { // Only give one error here. @@ -81,7 +81,7 @@ static const bool value = false; }; -static_assert(first_trait::value && second_trait::value, "message"); // expected-error{{static_assert failed due to requirement 'second_trait::value' "message"}} +static_assert(first_trait::value && second_trait::value, "message"); // expected-error{{static_assert failed due to requirement 'second_trait::value': message}} namespace std { @@ -125,29 +125,29 @@ }; static_assert(std::is_same::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_same::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_same::value': message}} static_assert(std::is_const::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value': message}} static_assert(!std::is_const::value, "message"); -// expected-error@-1{{static_assert failed due to requirement '!std::is_const::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement '!std::is_const::value': message}} static_assert(!(std::is_const::value), "message"); -// expected-error@-1{{static_assert failed due to requirement '!(std::is_const::value)' "message"}} +// expected-error@-1{{static_assert failed due to requirement '!(std::is_const::value)': message}} static_assert(std::is_const::value == false, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value == false' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value == false': message}} static_assert(!(std::is_const::value == true), "message"); -// expected-error@-1{{static_assert failed due to requirement '!(std::is_const::value == true)' "message"}} +// expected-error@-1{{static_assert failed due to requirement '!(std::is_const::value == true)': message}} static_assert(std::is_const(), "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const()' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const()': message}} static_assert(!(std::is_const()()), "message"); -// expected-error@-1{{static_assert failed due to requirement '!(std::is_const()())' "message"}} +// expected-error@-1{{static_assert failed due to requirement '!(std::is_const()())': message}} static_assert(std::is_same()), int>::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_same, int>::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_same, int>::value': message}} static_assert(std::is_const::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value': message}} static_assert(std::is_const::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value': message}} static_assert(std::is_const::value, "message"); -// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value' "message"}} +// expected-error@-1{{static_assert failed due to requirement 'std::is_const::value': message}} struct BI_tag {}; struct RAI_tag : BI_tag {}; @@ -160,7 +160,7 @@ template void foo() { static_assert(std::is_same::value, "message"); - // expected-error@-1{{static_assert failed due to requirement 'std::is_same::value' "message"}} + // expected-error@-1{{static_assert failed due to requirement 'std::is_same::value': message}} } template void foo(); // expected-note@-1{{in instantiation of function template specialization 'foo' requested here}} @@ -178,7 +178,7 @@ template void foo2() { static_assert(::ns::NestedTemplates1::NestedTemplates2::template NestedTemplates3::value, "message"); - // expected-error@-1{{static_assert failed due to requirement '::ns::NestedTemplates1::NestedTemplates2::NestedTemplates3::value' "message"}} + // expected-error@-1{{static_assert failed due to requirement '::ns::NestedTemplates1::NestedTemplates2::NestedTemplates3::value': message}} } template void foo2(); // expected-note@-1{{in instantiation of function template specialization 'foo2' requested here}} @@ -186,9 +186,9 @@ template void foo3(T t) { static_assert(std::is_const::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::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 --- 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 function_pointer() { { volatile std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::value'{{.*}}Pointer to function isn't allowed}} std::atomic_fetch_add(&fun, 0); } { std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::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 --- 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 function_pointer() { { volatile std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::value'{{.*}}Pointer to function isn't allowed}} std::atomic_fetch_add_explicit(&fun, 0, std::memory_order_relaxed); } { std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::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 --- 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 function_pointer() { { volatile std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::value'{{.*}}Pointer to function isn't allowed}} std::atomic_fetch_sub(&fun, 0); } { std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::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 --- 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 function_pointer() { { volatile std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::value'{{.*}}Pointer to function isn't allowed}} std::atomic_fetch_sub_explicit(&fun, 0, std::memory_order_relaxed); } { std::atomic fun; - // expected-error@atomic:* {{static_assert failed due to requirement '!is_function::value' "Pointer to function isn't allowed"}} + // expected-error-re@atomic:* {{static_assert failed due to requirement '!is_function::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 --- 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 > 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 --- 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 > 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 --- 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 @@ 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 --- 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 @@ 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 --- 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 > 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 --- 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>; - BadIter i; //expected-error-re@*:* {{static_assert failed{{.*}} "reverse_iterator requires It to be a bidirectional iterator."}} + BadIter i; //expected-error-re@*:* {{static_assert failed{{.*}}reverse_iterator 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 --- 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 @@ 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> 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 --- 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 @@ 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 --- 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 @@ { typedef std::pair 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>"}} + // expected-error-re@*:* {{static_assert failed{{( due to requirement '2U[L]{0,2} < 2')?}}{{.*}}Index out of bounds in std::tuple_element>}} } 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 --- 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 @@ { typedef std::variant 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 --- 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 @@ } 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_output_iterator >(); 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 --- 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 @@ const int *b = std::begin(arr), *e = std::end(arr); typedef cpp17_input_iterator 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 --- 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 @@ // 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

()); - // 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 --- 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 @@ // 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

()); - // 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 --- 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 @@ typedef double T; typedef std::array 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 --- 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 @@ typedef std::array 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 --- 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 @@ typedef std::array 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 --- 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 @@ typedef double T; typedef std::array 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 --- 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 @@ }; 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 --- 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 @@ std::span sp(array); // Offset too large templatized - [[maybe_unused]] auto s1 = sp.subspan<5>(); // expected-error@span:* {{span::subspan(): Offset out of range"}} + [[maybe_unused]] auto s1 = sp.subspan<5>(); // expected-error@span:* {{span::subspan(): Offset out of range}} // Count too large templatized - [[maybe_unused]] auto s2 = sp.subspan<0, 5>(); // expected-error@span:* {{span::subspan(): Offset + Count out of range"}} + [[maybe_unused]] auto s2 = sp.subspan<0, 5>(); // expected-error@span:* {{span::subspan(): Offset + Count out of range}} // Offset + Count too large templatized - [[maybe_unused]] auto s3 = sp.subspan<2, 3>(); // expected-error@span:* {{span::subspan(): Offset + Count out of range"}} + [[maybe_unused]] auto s3 = sp.subspan<2, 3>(); // expected-error@span:* {{span::subspan(): Offset + Count out of range}} // Offset + Count overflow templatized - [[maybe_unused]] auto s4 = sp.subspan<3, std::size_t(-2)>(); // expected-error@span:* {{span::subspan(): 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::subspan(): 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 --- 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 @@ } { using H = coro::coroutine_handle; - // expected-error@experimental/coroutine:* 1 {{static_assert failed "coroutine_handle::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::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::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 --- 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 @@ (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 --- 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 pi{std::numbers::pi_v}; int inv_pi{std::numbers::inv_pi_v}; 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 --- 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 @@ { 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 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 e3; std::linear_congruential_engine e4; - // expected-error@*:* {{static_assert failed due to requirement 'is_unsigned::value' "_UIntType must be unsigned type"}} + // expected-error-re@*:* {{static_assert failed due to requirement 'is_unsigned::value'{{.*}}_UIntType must be unsigned type}} std::linear_congruential_engine 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 --- 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 @@ typedef char C[3]; static_assert(std::is_array::value, ""); std::basic_string > 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::value, ""); std::basic_string > 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::value, ""); std::basic_string > 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 --- 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 @@ typedef char C[3]; static_assert(std::is_array::value, ""); std::basic_string_view > 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::value, ""); std::basic_string_view > 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::value, ""); std::basic_string_view > 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 --- a/libcxx/test/std/time/time.hms/hhmmss.fail.cpp +++ b/libcxx/test/std/time/time.hms/hhmmss.fail.cpp @@ -21,10 +21,10 @@ int main(int, char**) { - std::chrono::hh_mm_ss h0; // expected-error-re@*:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} - std::chrono::hh_mm_ss h1; // expected-error-re@*:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} - std::chrono::hh_mm_ss h2; // expected-error-re@*:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} - std::chrono::hh_mm_ss h3; // expected-error-re@*:* {{static_assert failed {{.*}} "template parameter of hh_mm_ss must be a std::chrono::duration"}} + std::chrono::hh_mm_ss h0; // expected-error-re@*:* {{static_assert failed{{.*}}template parameter of hh_mm_ss must be a std::chrono::duration}} + std::chrono::hh_mm_ss h1; // expected-error-re@*:* {{static_assert failed{{.*}}template parameter of hh_mm_ss must be a std::chrono::duration}} + std::chrono::hh_mm_ss h2; // expected-error-re@*:* {{static_assert failed{{.*}}template parameter of hh_mm_ss must be a std::chrono::duration}} + std::chrono::hh_mm_ss 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 --- 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 @@ 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(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(a2); // expected-note {{requested here}} } @@ -38,22 +38,22 @@ 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(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(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(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(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 --- 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 @@ { 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(static_cast(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(static_cast(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(static_cast(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(static_cast(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 --- 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 @@ 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(static_cast(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(static_cast(a)); // expected-note {{requested here}} std::any_cast(static_cast(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(static_cast(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 --- 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 @@ { 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(&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(&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(&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(&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(&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(&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(&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(&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 --- 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 @@ #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 --- 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 @@ int main(int, char**) { { - std::optional o1; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with a reference type is ill-formed"}} - std::optional o2; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with a non-destructible type is ill-formed"}} - std::optional o3; // expected-error-re@optional:* {{static_assert failed{{.*}} "instantiation of optional with an array type is ill-formed"}} + std::optional o1; // expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of optional with a reference type is ill-formed}} + std::optional o2; // expected-error-re@optional:* {{static_assert failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}} + std::optional 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 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 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 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 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 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 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 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 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 --- 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 @@ { // 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 --- 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 @@ { 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 opt1; optional 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 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 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 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 --- 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 @@ using std::in_place; optional 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 --- a/libcxx/test/std/utilities/utility/forward/forward.fail.cpp +++ b/libcxx/test/std/utilities/utility/forward/forward.fail.cpp @@ -23,7 +23,7 @@ { { (void)std::forward(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 --- 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 @@ using V = std::variant; 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}}