1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify %s
2 // RUN: %clang_cc1 -verify=ref %s
8 constexpr int dead1() { // expected-error {{never produces a constant expression}}
12 Foo F
{12}; // expected-note 2{{declared here}}
14 } // Ends lifetime of F.
16 return F2
->a
; // expected-note 2{{read of variable whose lifetime has ended}} \
17 // ref-note {{read of object outside its lifetime is not allowed in a constant expression}}
19 static_assert(dead1() == 1, ""); // expected-error {{not an integral constant expression}} \
20 // expected-note {{in call to}} \
21 // ref-error {{not an integral constant expression}} \
22 // ref-note {{in call to}} \