blob: 3e46214c70b83ecde52dbfdb0768642591e34e14 [file] [log] [blame]
Sebastian Redl5967d622010-08-24 00:50:16 +00001// Test C++ chained PCH functionality
2
3// Without PCH
Andrew Trick7cffb552010-10-19 21:14:46 +00004// RUN: %clang_cc1 -fsyntax-only -verify -include %S/Inputs/chain-cxx1.h -include %S/Inputs/chain-cxx2.h %s
Sebastian Redl5967d622010-08-24 00:50:16 +00005
6// With PCH
Andrew Trick7cffb552010-10-19 21:14:46 +00007// RUN: %clang_cc1 -x c++ -emit-pch -o %t1 %S/Inputs/chain-cxx1.h
8// RUN: %clang_cc1 -x c++ -emit-pch -o %t2 %S/Inputs/chain-cxx2.h -include-pch %t1 -chained-pch
Sebastian Redl5967d622010-08-24 00:50:16 +00009// RUN: %clang_cc1 -fsyntax-only -verify -include-pch %t2 %s
10
11void test() {
12 f();
13 f(1);
14 pf();
15 f2();
16
17 ns::g();
18 ns::g(1);
19 ns::pg();
20 ns::g2();
21
Sebastian Redl4153a062010-08-24 22:50:24 +000022 typedef S<double>::G T1;
23 typedef S<double *>::H T2;
24 typedef S<int>::I T3;
25 typedef S<double &>::J T4;
26 typedef S<int *>::K T5;
27 typedef S<int &>::L T6;
Sebastian Redl5967d622010-08-24 00:50:16 +000028}