Skip to content

Commit 55da0b3

Browse files
committed
fixing failed tests
1 parent ca26274 commit 55da0b3

File tree

6 files changed

+23
-35
lines changed

6 files changed

+23
-35
lines changed

libc/config/gpu/nvptx/config.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,44 @@
66
},
77
"printf": {
88
"LIBC_CONF_PRINTF_DISABLE_FLOAT": {
9-
"value": true
9+
"value": true,
10+
"define": "LIBC_COPT_PRINTF_DISABLE_FLOAT"
1011
},
1112
"LIBC_CONF_PRINTF_DISABLE_INDEX_MODE": {
12-
"value": true
13+
"value": true,
14+
"define": "LIBC_COPT_PRINTF_DISABLE_INDEX_MODE"
1315
},
1416
"LIBC_CONF_PRINTF_DISABLE_WRITE_INT": {
15-
"value": true
17+
"value": true,
18+
"copt": "LIBC_COPT_PRINTF_DISABLE_WRITE_INT"
1619
},
1720
"LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE": {
18-
"value": false
21+
"value": false,
22+
"copt": "LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE"
1923
},
2024
"LIBC_CONF_PRINTF_DISABLE_STRERROR": {
21-
"value": true
25+
"value": true,
26+
"copt": "LIBC_COPT_PRINTF_DISABLE_STRERROR"
2227
},
2328
"LIBC_CONF_PRINTF_RUNTIME_DISPATCH": {
24-
"value": false
29+
"value": false,
30+
"copt": "LIBC_COPT_PRINTF_RUNTIME_DISPATCH"
2531
}
2632
},
2733
"scanf": {
2834
"LIBC_CONF_SCANF_DISABLE_FLOAT": {
29-
"value": true
35+
"value": true,
36+
"copt": "LIBC_COPT_SCANF_DISABLE_FLOAT"
3037
},
3138
"LIBC_CONF_SCANF_DISABLE_INDEX_MODE": {
32-
"value": true
39+
"value": true,
40+
"copt": "LIBC_COPT_SCANF_DISABLE_INDEX_MODE"
3341
}
3442
},
3543
"math": {
3644
"LIBC_CONF_MATH_OPTIMIZATIONS": {
37-
"value": "(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT)"
45+
"value": "(LIBC_COPT_MATH_SKIP_ACCURATE_PASS | LIBC_COPT_MATH_SMALL_TABLES)",
46+
"define": "LIBC_COPT_MATH_OPTIMIZATIONS"
3847
}
3948
}
4049
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ void test() {
128128
{
129129
std::expected<int, int> f1(1);
130130

131-
f1.and_then([](const int&){ return std::expected<int, int>(1); }); // expected-warning {{ignoring return value of type 'expected<int, int>' declared with 'nodiscard' attribute}}
132-
// expected-error-re@*:* {{no type named 'type' in 'std::invoke_result<{{.*}}>'}}
133-
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f({{.*}}) must be a specialization of std::expected}}
131+
f1.and_then([](const int&){ return std::expected<int, int>(1); }); // expected-warning{{ignoring return value of function declared with 'nodiscard' attribute}}
134132
}
135133
}
136134
// clang-format on

libcxx/test/libcxx/utilities/expected/expected.expected/nodiscard.verify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ std::expected<int, int> returns_expected() { return std::expected<int, int>(5);
1919
std::expected<void, int> returns_expected_void() { return std::expected<void, int>(); }
2020

2121
void test() {
22-
returns_expected(); // expected-warning {{ignoring return value of type 'expected<int, int>' declared with 'nodiscard' attribute}}
22+
returns_expected(); // expected-warning{{ignoring return value of function declared with 'nodiscard' attribute}}
2323

24-
returns_expected_void(); // expected-warning {{ignoring return value of type 'expected<void, int>' declared with 'nodiscard' attribute}}
24+
returns_expected_void(); // expected-warning{{ignoring return value of function declared with 'nodiscard' attribute}}
2525
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ void test() {
127127
{
128128
std::expected<int, int> f1(1);
129129

130-
f1.or_else([](const int&){ return std::expected<int, int>(1); }); // expected-warning {{ignoring return value of type 'expected<int, int>' declared with 'nodiscard' attribute}}
131-
// expected-error-re@*:* {{no type named 'type' in 'std::invoke_result<{{.*}}>'}}
132-
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f({{.*}}) must be a specialization of std::expected}}
130+
f1.or_else([](const int&){ return std::expected<int, int>(1); }); // expected-warning{{ignoring return value of function declared with 'nodiscard' attribute}}
131+
133132
}
134133
}
135134
// clang-format on

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,5 @@ void test() {
122122
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f() must have the same error_type as this expected}}
123123
}
124124
}
125-
126-
// Test nodiscard
127-
{
128-
std::expected<int, int> f1(1);
129-
130-
f1.and_then([](void){ return std::expected<int, int>(1); }); // expected-warning {{ignoring return value of type 'expected<int, int>' declared with 'nodiscard' attribute}}
131-
// expected-error-re@*:* {{no type named 'type' in 'std::invoke_result<{{.*}}>'}}
132-
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f({{.*}}) must be a specialization of std::expected}}
133-
}
134125
}
135126
// clang-format on

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,5 @@ void test() {
118118
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f(std::move(error())) must have the same value_type as this expected}}
119119
}
120120
}
121-
122-
// Test nodiscard
123-
{
124-
std::expected<int, int> f1(1);
125-
126-
f1.or_else([](void){ return std::expected<int, int>(1); }); // expected-warning {{ignoring return value of type 'expected<int, int>' declared with 'nodiscard' attribute}}
127-
// expected-error-re@*:* {{no type named 'type' in 'std::invoke_result<{{.*}}>'}}
128-
// expected-error-re@*:* {{static assertion failed {{.*}}The result of f({{.*}}) must be a specialization of std::expected}}
129-
}
130121
}
131122
// clang-format on

0 commit comments

Comments
 (0)