[JITLink][LoongArch] Support R_LARCH_ALIGN relaxation (#122259)
[llvm-project.git] / clang / test / CXX / dcl.dcl / dcl.spec / dcl.constinit / p3.cpp
blob0baea03e4b59216d1c2faa2f6be0ce4c1788546a
1 // RUN: %clang_cc1 -std=c++2a -verify %s
3 const char *g() { return "dynamic initialization"; } // expected-note {{declared here}}
4 constexpr const char *f(bool b) { return b ? "constant initialization" : g(); } // expected-note {{non-constexpr function 'g'}}
5 constinit const char *c = f(true);
6 constinit const char *d = f(false); // expected-error {{does not have a constant initializer}} expected-note 2{{}}