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