1 // RUN: %clang_cc1 -emit-pch -o %t.1 %s
2 // RUN: %clang_cc1 -error-on-deserialized-decl S1_keyfunc -error-on-deserialized-decl S3 -include-pch %t.1 -emit-pch -o %t.2 %s
3 // RUN: %clang_cc1 -error-on-deserialized-decl S1_method -error-on-deserialized-decl S3 -include-pch %t.2 -emit-llvm-only %s
4
5 #ifndef HEADER1
6 #define HEADER1
7 // Header.
8
9 struct S1 {
10 void S1_method();
11 virtual void S1_keyfunc();
12 };
13
14 struct S3 {};
15
16 struct S2 {
17 operator S3();
18 };
19
20 #elif !defined(HEADER2)
21 #define HEADER2
22
23 // Chained PCH.
24 S1 *s1;
25 S2 *s2;
26
27 #else
28
29 // Using the headers.
30
test(S1 *,S2 *)31 void test(S1*, S2*) {
32 }
33
34 #endif
35