Skip to content

Commit 2e535e4

Browse files
committed
Fixes
1 parent f436493 commit 2e535e4

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

libcxx/test/libcxx/diagnostics/syserr/nodiscard.verify.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,66 +42,66 @@ void test() {
4242
}
4343
{ // <system_error>
4444
{
45-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
45+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
4646
std::generic_category();
4747

4848
const std::error_category& ec = std::generic_category();
4949

50-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
50+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5151
ec.name();
52-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
52+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5353
ec.default_error_condition(94);
54-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
54+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5555
ec.equivalent(94, ec.default_error_condition(82));
56-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
56+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5757
ec.equivalent(std::error_code(49, ec), 94);
58-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
58+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5959
ec.message(82);
6060
}
6161
{
62-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
62+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
6363
std::system_category();
6464

6565
const std::error_category& ec = std::system_category();
6666

67-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
67+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
6868
ec.name();
69-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
69+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
7070
ec.default_error_condition(94);
71-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
71+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
7272
ec.equivalent(94, ec.default_error_condition(82));
73-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
73+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
7474
ec.equivalent(std::error_code(49, ec), 94);
75-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
75+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
7676
ec.message(82);
7777
}
7878
{
7979
std::error_code ec;
8080

81-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
81+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
8282
ec.value();
83-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
83+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
8484
ec.category();
85-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
85+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
8686
ec.default_error_condition();
8787

88-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
88+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
8989
ec.message();
9090

91-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
91+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
9292
std::make_error_code(std::errc::invalid_argument);
9393
}
9494
{
9595
std::error_condition ec;
9696

97-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
97+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
9898
ec.value();
99-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
99+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
100100
ec.category();
101-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
101+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
102102
ec.message();
103103

104-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute' attribute}}
104+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
105105
std::make_error_condition(std::errc::invalid_argument);
106106
}
107107
}

libcxx/test/libcxx/language.support/nodiscard.verify.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
// UNSUPPORTED: c++03
10-
119
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
1210
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION
1311

0 commit comments

Comments
 (0)