Skip to content

Commit 94a8b14

Browse files
committed
Formatting
1 parent 1fc645d commit 94a8b14

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ void test() {
4949
*sPtr; // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
5050
sPtr.use_count(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
5151
#if TEST_STD_VER <= 20
52-
sPtr.unique(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
52+
sPtr.unique(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
5353
#endif
5454
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5555
sPtr.owner_before(std::shared_ptr<int>());
5656
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
5757
sPtr.owner_before(std::weak_ptr<int>());
58-
# if TEST_STD_VER >= 17
58+
#if TEST_STD_VER >= 17
5959
sPtr[0]; // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
60-
# endif
60+
#endif
6161

6262
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
6363
std::allocate_shared<int>(std::allocator<int>(), 5);
6464
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
6565
std::make_shared<int>();
66-
# if TEST_STD_VER >= 20
66+
#if TEST_STD_VER >= 20
6767
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
6868
std::allocate_shared_for_overwrite<int>(std::allocator<int>());
6969
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
@@ -96,7 +96,7 @@ void test() {
9696
std::make_shared<int[]>(5, 82);
9797
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
9898
std::make_shared_for_overwrite<int[]>(5);
99-
# endif
99+
#endif
100100

101101
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
102102
std::static_pointer_cast<int[]>(sPtr);
@@ -116,10 +116,10 @@ void test() {
116116
std::reinterpret_pointer_cast<int[]>(sPtr);
117117
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
118118
std::reinterpret_pointer_cast<int[]>(std::move(sPtr));
119-
# if !defined(TEST_HAS_NO_RTTI)
119+
#if !defined(TEST_HAS_NO_RTTI)
120120
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
121121
std::get_deleter<int[]>(sPtr);
122-
# endif
122+
#endif
123123
}
124124
{ // [util.smartptr.weak]
125125
std::weak_ptr<int> wPtr;
@@ -139,18 +139,18 @@ void test() {
139139

140140
es.shared_from_this(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
141141
ces.shared_from_this(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
142-
# if TEST_STD_VER >= 17
142+
#if TEST_STD_VER >= 17
143143
es.weak_from_this(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
144144
ces.weak_from_this(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
145-
# endif
145+
#endif
146146
}
147-
# if TEST_STD_VER >= 23
147+
#if TEST_STD_VER >= 23
148148
{ // [smartptr.adapt]
149149
std::unique_ptr<int> uPtr;
150150
// [inout.ptr]
151151
std::inout_ptr(uPtr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
152152
// [out.ptr]
153153
std::out_ptr(uPtr); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
154154
}
155-
# endif
155+
#endif
156156
}

0 commit comments

Comments
 (0)