Skip to content

Commit f2913ca

Browse files
committed
Fix build
1 parent 8962d8b commit f2913ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,14 @@ void test_members() {
123123

124124
void test_nonmembers() {
125125
// std::hash<>
126-
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
126+
127127
std::hash<std::string_view> hash;
128-
hash();
128+
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}
129+
hash(std::string_view{});
129130

130131
#if TEST_STD_VER >= 14
131132
// string_view literals
133+
132134
using namespace std::string_view_literals;
133135

134136
// expected-warning@+1 {{ignoring return value of function declared with 'nodiscard' attribute}}

0 commit comments

Comments
 (0)