Argyrios Kyrtzidis | eb5e998 | 2010-10-14 20:14:34 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-pch -o %t %s |
| 2 | // RUN: %clang_cc1 -error-on-deserialized-decl S1_method -include-pch %t -emit-llvm-only %s |
| 3 | |
| 4 | #ifndef HEADER |
| 5 | #define HEADER |
| 6 | // Header. |
| 7 | |
| 8 | struct S1 { |
| 9 | void S1_method(); // This should not be deserialized. |
Argyrios Kyrtzidis | 36d2fd4 | 2010-10-14 20:14:38 +0000 | [diff] [blame] | 10 | virtual void S1_keyfunc(); |
Argyrios Kyrtzidis | eb5e998 | 2010-10-14 20:14:34 +0000 | [diff] [blame] | 11 | }; |
| 12 | |
| 13 | |
| 14 | #else |
| 15 | // Using the header. |
| 16 | |
| 17 | void test(S1*) { |
| 18 | } |
| 19 | |
| 20 | #endif |