Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / dcl.dcl / dcl.spec / dcl.constinit / p2.cpp
blob22ac7a191bdeab66e835115be80999dfa585c536
1 // RUN: %clang_cc1 -std=c++2a -verify %s
3 int f(); // expected-note 2{{declared here}}
5 constinit int a;
6 constinit int b = f(); // expected-error {{does not have a constant initializer}} expected-note {{required by}} expected-note {{non-constexpr function 'f'}}
7 extern constinit int c; // expected-note {{here}} expected-note {{required by}}
8 int c = f(); // expected-warning {{missing}} expected-error {{does not have a constant initializer}} expected-note {{non-constexpr function 'f'}}