Skip to content

Commit d5be40c

Browse files
committed
Removed redundant expected-error.
1 parent 857c4d5 commit d5be40c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ 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@*:* 0-1{{call to deleted constructor of 'MoveOnly'}}
8685
}
8786

8887
// is_copy_constructible_v<E> is true and is_constructible_v<E, decltype(std::move(error()))> is true.
@@ -96,7 +95,6 @@ void test() {
9695
std::expected<int, CopyConstructibleButNotMoveConstructible> e;
9796
[[maybe_unused]] auto val = std::move(e).value();
9897
// expected-error-re@*:* {{static assertion failed {{.*}}error_type has to be both copy constructible and constructible from decltype(std::move(error()))}}
99-
// expected-error@*:* 0-1{{call to deleted constructor of 'CopyConstructibleButNotMoveConstructible'}}
10098
}
10199
}
102100

@@ -126,8 +124,8 @@ void test() {
126124
#if _LIBCPP_HAS_EXCEPTIONS
127125
// expected-error-re@*:* {{call to deleted constructor of{{.*}}}}
128126
// expected-error-re@*:* {{call to deleted constructor of{{.*}}}}
129-
// expected-error-re@*:* 0-1{{call to deleted constructor of{{.*}}}}
130-
// expected-error-re@*:* 0-1{{call to deleted constructor of{{.*}}}}
127+
// expected-error-re@*:* 1-2{{call to deleted constructor of{{.*}}}}
128+
// expected-error-re@*:* 1-2{{call to deleted constructor of{{.*}}}}
131129
#endif
132130
}
133131
// clang-format on

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ int main(int, char**) {
2828
{
2929
MoveOnly mo[] = {MoveOnly{3}};
3030
// expected-error@array:* {{to_array requires copy constructible elements}}
31-
// expected-error-re@array:* 0-1{{{{(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
32-
// expected-error@array:* 0-1{{call to deleted constructor of 'MoveOnly'}}
31+
// expected-error-re@array:* 1-2{{{{(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
3332
std::to_array(mo); // expected-note {{requested here}}
3433
}
3534

3635
{
3736
const MoveOnly cmo[] = {MoveOnly{3}};
3837
// expected-error@array:* {{to_array requires move constructible elements}}
39-
// expected-error-re@array:* 0-1{{{{(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
38+
// expected-error-re@array:* {{{{(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
4039
std::to_array(std::move(cmo)); // expected-note {{requested here}}
4140
}
4241

0 commit comments

Comments
 (0)