xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/cxx-for-range.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // Test this without pch.
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-for-range.h -fsyntax-only -emit-llvm -o - %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // Test with pch.
5*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-for-range.h
6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
7*f4a2713aSLionel Sambuc 
h()8*f4a2713aSLionel Sambuc void h() {
9*f4a2713aSLionel Sambuc   f();
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc   g<int>();
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc   char a[3] = { 0, 1, 2 };
14*f4a2713aSLionel Sambuc   for (auto w : a)
15*f4a2713aSLionel Sambuc     for (auto x : S())
16*f4a2713aSLionel Sambuc       for (auto y : T())
17*f4a2713aSLionel Sambuc         for (auto z : U())
18*f4a2713aSLionel Sambuc           ;
19*f4a2713aSLionel Sambuc }
20