diff options
Diffstat (limited to 'libcxx/test/std/containers/sequences/array/empty.fail.cpp')
-rw-r--r-- | libcxx/test/std/containers/sequences/array/empty.fail.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcxx/test/std/containers/sequences/array/empty.fail.cpp b/libcxx/test/std/containers/sequences/array/empty.fail.cpp index 85bf5a7c9da..fe118c5f19b 100644 --- a/libcxx/test/std/containers/sequences/array/empty.fail.cpp +++ b/libcxx/test/std/containers/sequences/array/empty.fail.cpp @@ -23,6 +23,9 @@ int main () { + std::array<int, 1> c; - c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + c.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::array<int, 0> c0; + c0.empty(); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} } |