const NonTrivial &getNonTrivialRef() { return NonTrivial(42); // expected-warning {{Address of stack memory associated with temporary object of type 'NonTrivial' returned to caller}} }
void bar() { POD b; b.b = 13; int c = foo(NonTrivial(), b); }
NonTrivial getNonTrivial() { return NonTrivial(42); // no-warning }