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