Sebastian Redl | 5967d62 | 2010-08-24 00:50:16 +0000 | [diff] [blame] | 1 | // Test C++ chained PCH functionality |
| 2 | |
| 3 | // Without PCH |
Andrew Trick | 7cffb55 | 2010-10-19 21:14:46 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -fsyntax-only -verify -include %S/Inputs/chain-cxx1.h -include %S/Inputs/chain-cxx2.h %s |
Sebastian Redl | 5967d62 | 2010-08-24 00:50:16 +0000 | [diff] [blame] | 5 | |
| 6 | // With PCH |
Andrew Trick | 7cffb55 | 2010-10-19 21:14:46 +0000 | [diff] [blame] | 7 | // 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 Redl | 5967d62 | 2010-08-24 00:50:16 +0000 | [diff] [blame] | 9 | // RUN: %clang_cc1 -fsyntax-only -verify -include-pch %t2 %s |
| 10 | |
| 11 | void 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 Redl | 4153a06 | 2010-08-24 22:50:24 +0000 | [diff] [blame] | 22 | 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 Redl | 5967d62 | 2010-08-24 00:50:16 +0000 | [diff] [blame] | 28 | } |