================ @@ -154,3 +154,26 @@ int g() { static_assert(f(arr) == 5); } } + +namespace GH128409 { + int &ff(); + int &x = ff(); // nointerpreter-note {{declared here}} + constinit int &z = x; // expected-error {{variable does not have a constant initializer}} + // expected-note@-1 {{required by 'constinit' specifier here}} + // nointerpreter-note@-2 {{initializer of 'x' is not a constant expression}} ---------------- tbaederr wrote:
https://godbolt.org/z/81M8aYGPn Yeah, not a fan of any of this. But this patch LGTM. https://github.com/llvm/llvm-project/pull/129952 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits