Lines Matching defs:Trivial
8 struct Trivial {
9 Trivial(int x) : value(x) {}
13 struct NonTrivial : public Trivial {
14 NonTrivial(int x) : Trivial(x) {}
19 Trivial getTrivial() {
20 return Trivial(42); // no-warning
23 const Trivial &getTrivialRef() {
24 return Trivial(42); // expected-warning {{Address of stack memory associated with temporary object of type 'Trivial' returned to caller}}
37 struct TrivialSubclass : public Trivial {
38 TrivialSubclass(int x) : Trivial(x), anotherValue(-x) {}
63 const Trivial &baseRef = getTrivialSub();
69 struct Derived : public Trivial {
70 Derived(int value) : Trivial(value), value2(-value) {}
77 const Trivial * const &pointerRef = &obj;
420 static const Trivial &ref = getTrivial();
423 static const Trivial &directRef = Trivial(42);
427 thread_local static const Trivial &threadRef = getTrivial();
430 thread_local static const Trivial &threadDirectRef = Trivial(42);