6 foo (int i) : m_i (i) {} // { dg-message "argument 'this' of 'foo::foo\\(int\\)' must be non-null" "note" }
8 int get () const { return m_i; } // { dg-message "argument 'this' of '\[^\n\]*' must be non-null" "note" }
10 int meth_1 (int, void *ptr) __attribute__((nonnull)); // { dg-message "argument 2 of '\[^\n\]*' must be non-null" "note" }
11 int meth_2 (int, void *ptr) __attribute__((nonnull(3))); // { dg-message "argument 2 of '\[^\n\]*' must be non-null" "note" }
18 foo *p = new(NULL) foo (42); // { dg-warning "non-null expected" "warning" }
19 // { dg-message "argument 'this'( \\(\[^\n\]*\\))? NULL where non-null expected" "final event" { target *-*-* } .-1 }
25 return p->get (); // { dg-warning "non-null expected" "warning" }
26 // { dg-message "argument 'this' \\('p'\\) NULL where non-null expected" "final event" { target *-*-* } .-1 }
29 int test_meth_1 (foo *f)
31 return f->meth_1 (42, NULL); // { dg-warning "non-null expected" "warning" }
32 // { dg-message "argument 2 NULL where non-null expected" "final event" { target *-*-* } .-1 }
35 int test_meth_2 (foo *f)
37 return f->meth_2 (42, NULL); // { dg-warning "non-null expected" "warning" }
38 // { dg-message "argument 2 NULL where non-null expected" "final event" { target *-*-* } .-1 }