Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / cxx-for-range.h
blob8f50f2f2692841422fa40972bac9d4c48000a84c
1 // Header for PCH test cxx-for-range.cpp
3 struct S {
4 int *begin();
5 int *end();
6 };
8 struct T { };
9 char *begin(T);
10 char *end(T);
12 namespace NS {
13 struct U { };
14 char *begin(U);
15 char *end(U);
17 using NS::U;
19 void f() {
20 char a[3] = { 0, 1, 2 };
21 for (auto w : a)
22 for (auto x : S())
23 for (auto y : T())
24 for (auto z : U())
28 template<typename A>
29 void g() {
30 A a[3] = { 0, 1, 2 };
31 for (auto &v : a)
32 for (auto x : S())
33 for (auto y : T())
34 for (auto z : U())