1 // RUN: %clang_cc1 -std=c++1z -verify %s
3 namespace std_example
{
4 struct [[nodiscard
]] error_info
{
8 error_info
enable_missile_safety_mode();
9 void launch_missiles();
10 void test_missiles() {
11 enable_missile_safety_mode(); // expected-warning {{ignoring return value of type 'error_info' declared with 'nodiscard'}}
16 void f() { foo(); } // no warning