blob: bffa09228f90c251a84c721b13c5a2a9eb2004ff [file] [log] [blame]
Sebastian Redl671eee92010-07-30 17:25:10 +00001// 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 Gregor2ed0ee12011-08-25 22:54:01 +00006// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1
Sebastian Redl671eee92010-07-30 17:25:10 +00007// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
8// RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
9
Andy Gibbsc6e68da2012-10-19 12:44:48 +000010// expected-no-diagnostics
11
Sebastian Redl671eee92010-07-30 17:25:10 +000012// CHECK: void f();
13// CHECK: void g();
14
Sebastian Redl78f51772010-08-02 18:30:12 +000015int h() {
Sebastian Redl671eee92010-07-30 17:25:10 +000016 f();
17 g();
18
19 struct one x;
20 one();
21 struct two y;
22 two();
23 struct three z;
Sebastian Redl78f51772010-08-02 18:30:12 +000024
25 many(0);
26 struct many m;
27
28 noret();
Sebastian Redl671eee92010-07-30 17:25:10 +000029}