Sebastian Redl | 671eee9 | 2010-07-30 17:25:10 +0000 | [diff] [blame] | 1 | // Test this without pch. |
| 2 | // RUN: %clang_cc1 -include %S/Inputs/chain-decls1.h -include %S/Inputs/chain-decls2.h -fsyntax-only -verify %s |
| 3 | |
| 4 | // Test with pch. |
| 5 | // RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-decls1.h |
Douglas Gregor | 2ed0ee1 | 2011-08-25 22:54:01 +0000 | [diff] [blame] | 6 | // RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1 |
Sebastian Redl | 671eee9 | 2010-07-30 17:25:10 +0000 | [diff] [blame] | 7 | // RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s |
| 8 | // RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s |
| 9 | |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 10 | // expected-no-diagnostics |
| 11 | |
Sebastian Redl | 671eee9 | 2010-07-30 17:25:10 +0000 | [diff] [blame] | 12 | // CHECK: void f(); |
| 13 | // CHECK: void g(); |
| 14 | |
Sebastian Redl | 78f5177 | 2010-08-02 18:30:12 +0000 | [diff] [blame] | 15 | int h() { |
Sebastian Redl | 671eee9 | 2010-07-30 17:25:10 +0000 | [diff] [blame] | 16 | f(); |
| 17 | g(); |
| 18 | |
| 19 | struct one x; |
| 20 | one(); |
| 21 | struct two y; |
| 22 | two(); |
| 23 | struct three z; |
Sebastian Redl | 78f5177 | 2010-08-02 18:30:12 +0000 | [diff] [blame] | 24 | |
| 25 | many(0); |
| 26 | struct many m; |
| 27 | |
| 28 | noret(); |
Sebastian Redl | 671eee9 | 2010-07-30 17:25:10 +0000 | [diff] [blame] | 29 | } |