Skip to content

Commit bdfe173

Browse files
committed
Add missing [[nodiscard]] test
Comment: #86133 (comment)
1 parent 01540ec commit bdfe173

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcxx/test/libcxx/utilities/function.objects/func.not.fn/not_fn.nttp.nodiscard.verify.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818
void test() {
1919
using F = std::true_type;
2020
std::not_fn<F{}>(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
21+
22+
auto negated = std::not_fn<F{}>();
23+
negated(); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}}
2124
}

0 commit comments

Comments
 (0)