Skip to content

Commit eeb8d3d

Browse files
committed
Updated expected error in diagnostic checks in libcxx tests.
1 parent 9c9a32d commit eeb8d3d

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

libcxx/test/libcxx/utilities/expected/expected.expected/and_then.mandates.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void test() {
5555
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}}
5656
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
5757
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
58-
// expected-error@*:* {{excess elements in struct initializer}}
58+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
5959
}
6060

6161
// !std::is_same_v<U:error_type, E>
@@ -75,7 +75,7 @@ void test() {
7575
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}}
7676
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
7777
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
78-
// expected-error@*:* {{excess elements in struct initializer}}
78+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
7979
}
8080

8181
// !std::is_same_v<U:error_type, E>
@@ -96,7 +96,7 @@ void test() {
9696
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must be a specialization of std::expected}}
9797
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
9898
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
99-
// expected-error@*:* {{excess elements in struct initializer}}
99+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
100100
}
101101

102102
// !std::is_same_v<U:error_type, E>
@@ -116,7 +116,7 @@ void test() {
116116
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(value())) must be a specialization of std::expected}}
117117
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
118118
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
119-
// expected-error@*:* {{excess elements in struct initializer}}
119+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
120120
}
121121

122122
// !std::is_same_v<U:error_type, E>

libcxx/test/libcxx/utilities/expected/expected.expected/or_else.mandates.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void test() {
5555
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(error()) must be a specialization of std::expected}}
5656
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
5757
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
58-
// expected-error@*:* {{excess elements in struct initializer}}
58+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
5959
}
6060

6161
// !std::is_same_v<G:value_type, T>
@@ -75,7 +75,7 @@ void test() {
7575
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(error()) must be a specialization of std::expected}}
7676
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
7777
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
78-
// expected-error@*:* {{excess elements in struct initializer}}
78+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
7979
}
8080

8181
// !std::is_same_v<G:value_type, T>
@@ -95,7 +95,7 @@ void test() {
9595
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(error())) must be a specialization of std::expected}}
9696
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
9797
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
98-
// expected-error@*:* {{excess elements in struct initializer}}
98+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
9999
}
100100

101101
// !std::is_same_v<G:value_type, T>
@@ -115,7 +115,7 @@ void test() {
115115
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(error())) must be a specialization of std::expected}}
116116
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
117117
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
118-
// expected-error@*:* {{excess elements in struct initializer}}
118+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
119119
}
120120

121121
// !std::is_same_v<G:value_type, T>

libcxx/test/libcxx/utilities/expected/expected.expected/value.observers.verify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void test() {
8282
std::expected<int, MoveOnly> e;
8383
[[maybe_unused]] auto val = std::move(e).value();
8484
// expected-error-re@*:* {{static assertion failed {{.*}}error_type has to be both copy constructible and constructible from decltype(std::move(error()))}}
85-
// expected-error@*:* {{call to deleted constructor of 'MoveOnly'}}
85+
// expected-error@*:* 0-1{{call to deleted constructor of 'MoveOnly'}}
8686
}
8787

8888
// is_copy_constructible_v<E> is true and is_constructible_v<E, decltype(std::move(error()))> is true.
@@ -96,7 +96,7 @@ void test() {
9696
std::expected<int, CopyConstructibleButNotMoveConstructible> e;
9797
[[maybe_unused]] auto val = std::move(e).value();
9898
// expected-error-re@*:* {{static assertion failed {{.*}}error_type has to be both copy constructible and constructible from decltype(std::move(error()))}}
99-
// expected-error@*:* {{call to deleted constructor of 'CopyConstructibleButNotMoveConstructible'}}
99+
// expected-error@*:* 0-1{{call to deleted constructor of 'CopyConstructibleButNotMoveConstructible'}}
100100
}
101101
}
102102

libcxx/test/libcxx/utilities/expected/expected.void/and_then.mandates.verify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void test() {
5555
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f() must be a specialization of std::expected}}
5656
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
5757
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
58-
// expected-error@*:* {{excess elements in struct initializer}}
58+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
5959
}
6060

6161
// !std::is_same_v<U:error_type, E>
@@ -75,7 +75,7 @@ void test() {
7575
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f() must be a specialization of std::expected}}
7676
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
7777
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
78-
// expected-error@*:* {{excess elements in struct initializer}}
78+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
7979
}
8080

8181
// !std::is_same_v<U:error_type, E>
@@ -95,7 +95,7 @@ void test() {
9595
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f() must be a specialization of std::expected}}
9696
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
9797
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
98-
// expected-error@*:* {{excess elements in struct initializer}}
98+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
9999
}
100100

101101
// !std::is_same_v<U:error_type, E>
@@ -115,7 +115,7 @@ void test() {
115115
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f() must be a specialization of std::expected}}
116116
// expected-error-re@*:* {{{{.*}}cannot be used prior to '::' because it has no members}}
117117
// expected-error-re@*:* {{no matching constructor for initialization of{{.*}}}}
118-
// expected-error@*:* {{excess elements in struct initializer}}
118+
// expected-error@*:* 0-1{{excess elements in struct initializer}}
119119
}
120120

121121
// !std::is_same_v<U:error_type, E>

libcxx/test/std/containers/sequences/array/array.creation/to_array.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main(int, char**) {
2929
MoveOnly mo[] = {MoveOnly{3}};
3030
// expected-error@array:* {{to_array requires copy constructible elements}}
3131
// expected-error-re@array:* {{{{(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
32-
// expected-error@array:* {{call to deleted constructor of 'MoveOnly'}}
32+
// expected-error@array:* 0-1{{call to deleted constructor of 'MoveOnly'}}
3333
std::to_array(mo); // expected-note {{requested here}}
3434
}
3535

libcxx/test/std/containers/views/mdspan/mdspan/conversion.verify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void cant_construct_data_handle_type() {
4343
int data;
4444
std::mdspan<int, std::extents<int>, std::layout_right, convertible_accessor_but_not_handle<int>> m_nc(&data);
4545
// expected-error-re@*:* {{{{.*}}no matching constructor for initialization of {{.*}} (aka 'not_const_convertible_handle<const int>')}}
46-
// expected-error@*:* {{no matching constructor for initialization of 'not_const_convertible_handle<const int>'}}
46+
// expected-error@*:* 0-1{{no matching constructor for initialization of 'not_const_convertible_handle<const int>'}}
4747
// expected-error-re@*:* {{static assertion failed {{.*}}mdspan: incompatible data_handle_type for mdspan construction}}
4848
[[maybe_unused]] std::
4949
mdspan<const int, std::extents<int>, std::layout_right, convertible_accessor_but_not_handle<const int>> m_c(m_nc);
@@ -53,6 +53,6 @@ void mapping_constructible_despite_extents_compatibility() {
5353
int data;
5454
std::mdspan<int, std::extents<int>, always_convertible_layout> m(&data);
5555
// expected-error-re@*:* {{static assertion failed {{.*}}mdspan: incompatible extents for mdspan construction}}
56-
// expected-error@*:* {{no matching constructor for initialization of 'std::extents<int, 5>'}}
56+
// expected-error@*:* 0-1{{no matching constructor for initialization of 'std::extents<int, 5>'}}
5757
[[maybe_unused]] std::mdspan<int, std::extents<int, 5>, always_convertible_layout> m2(m);
5858
}

libcxx/test/std/utilities/function.objects/func.bind.partial/bind_back.verify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void test() {
6969
auto f = std::bind_back([](const Arg&) {}, x);
7070
// expected-error-re@*:* {{static assertion failed{{.*}}bind_back requires all decay_t<Args> to be constructible from respective Args}}
7171
// expected-error@*:* {{no matching constructor for initialization}}
72-
// expected-error@*:* {{call to deleted constructor of 'F'}}
73-
// expected-error@*:* {{call to deleted constructor of 'Arg'}}
72+
// expected-error@*:* 0-1{{call to deleted constructor of 'F'}}
73+
// expected-error@*:* 0-1{{call to deleted constructor of 'Arg'}}
7474
}
7575

7676
{ // Mandates: (is_move_constructible_v<decay_t<Args>> && ...)

libcxx/test/std/utilities/function.objects/func.bind_front/bind_front.verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ void f() {
4242
auto d = std::bind_front(do_nothing, n); // expected-error {{no matching function for call to 'bind_front'}}
4343

4444
auto t = std::bind_front(testNotMoveConst, NotMoveConst(0)); // expected-error {{no matching function for call to 'bind_front'}}
45-
// expected-error@*:* {{call to deleted constructor of 'NotMoveConst'}}
45+
// expected-error@*:* 0-1{{call to deleted constructor of 'NotMoveConst'}}
4646
}

0 commit comments

Comments
 (0)