Home
last modified time | relevance | path

Searched refs:out_of_lifetime (Results 1 – 1 of 1) sorted by relevance

/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dconstant-expression-cxx11.cpp201 constexpr S *out_of_lifetime(S s) { return &s; } // expected-warning {{address of stack}} in out_of_lifetime() function
202 static_assert(out_of_lifetime({})->k == 42, "");
203 static_assert(out_of_lifetime({})->f(3) == 128, "");
1962 constexpr Q *out_of_lifetime(Q q) { return &q; } // expected-warning {{address of stack}} in out_of_lifetime() function
1963 …constexpr int k3 = out_of_lifetime({})->n; // expected-error {{constant expression}} expected-note…
1964 …constexpr int k4 = out_of_lifetime({})->f(); // expected-error {{constant expression}} expected-no…