Skip to content

Commit 03fd879

Browse files
committed
Break verify test comments into their own lines and re-format
1 parent ea768b4 commit 03fd879

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/ctor.verify.cpp

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,40 @@ struct NonDestructible {
2424
};
2525

2626
int main(int, char**) {
27-
// clang-format off
2827
{
2928
#if TEST_STD_VER >= 26
30-
std::optional<int&&> opt2; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with an rvalue reference type is ill-formed}}
29+
std::optional<int&&> opt2;
30+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with an rvalue reference type is ill-formed}}
3131
#else
32-
std::optional<char&> o1; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with a reference type is ill-formed}}
32+
std::optional<char&> o1;
33+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with a reference type is ill-formed}}
3334
#endif
34-
std::optional<NonDestructible> o2; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}}
35-
std::optional<char[20]> o3; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with an array type is ill-formed}}
35+
std::optional<NonDestructible> o2;
36+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with a non-destructible type is ill-formed}}
37+
std::optional<char[20]> o3;
38+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with an array type is ill-formed}}
3639
}
3740

3841
{
39-
std::optional< std::in_place_t> o1; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
40-
std::optional<const std::in_place_t> o2; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
41-
std::optional< volatile std::in_place_t> o3; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
42-
std::optional<const volatile std::in_place_t> o4; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
42+
std::optional< std::in_place_t> o1;
43+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
44+
std::optional<const std::in_place_t> o2;
45+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
46+
std::optional< volatile std::in_place_t> o3;
47+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
48+
std::optional<const volatile std::in_place_t> o4;
49+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with in_place_t is ill-formed}}
4350
}
4451

4552
{
46-
std::optional< std::nullopt_t> o1; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
47-
std::optional<const std::nullopt_t> o2; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
48-
std::optional< volatile std::nullopt_t> o3; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
49-
std::optional<const volatile std::nullopt_t> o4; // expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
53+
std::optional< std::nullopt_t> o1;
54+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
55+
std::optional<const std::nullopt_t> o2;
56+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
57+
std::optional< volatile std::nullopt_t> o3;
58+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
59+
std::optional<const volatile std::nullopt_t> o4;
60+
// expected-error-re@optional:* {{static assertion failed{{.*}}instantiation of optional with nullopt_t is ill-formed}}
5061
}
51-
// clang-format on
5262
return 0;
5363
}

libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
struct A {};
2020

2121
int main(int, char**) {
22-
// Test the explicit deduction guides
23-
24-
// Test the implicit deduction guides
25-
2622
// clang-format off
2723
{
2824
// optional()

0 commit comments

Comments
 (0)