Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / cxx-constexpr.cpp
blob6ec1c8467e07352919e925e321a618309c8327b5
1 // RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t
2 // RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s
4 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t-cxx11
5 // RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t-cxx11 -verify %s
7 // RUN: %clang_cc1 -pedantic-errors -std=c++98 -emit-pch %s -o %t -fmodules
8 // RUN: %clang_cc1 -pedantic-errors -std=c++98 -include-pch %t -verify %s -fmodules
10 #ifndef HEADER_INCLUDED
12 #define HEADER_INCLUDED
13 extern const int a;
14 const int b = a;
16 #else
18 const int a = 5;
19 typedef int T[b]; // expected-error 2{{variable length array}} expected-note {{initializer of 'b'}}
20 // expected-note@14 {{here}}
21 typedef int T[5];
23 #endif