annotate clang/test/PCH/chain-decls.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Test this without pch.
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -include %S/Inputs/chain-decls1.h -include %S/Inputs/chain-decls2.h -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Test with pch.
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-decls1.h
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
8 // RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 // expected-no-diagnostics
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 // CHECK: void f();
anatofuz
parents:
diff changeset
13 // CHECK: void g();
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 int h() {
anatofuz
parents:
diff changeset
16 f();
anatofuz
parents:
diff changeset
17 g();
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 struct one x;
anatofuz
parents:
diff changeset
20 one();
anatofuz
parents:
diff changeset
21 struct two y;
anatofuz
parents:
diff changeset
22 two();
anatofuz
parents:
diff changeset
23 struct three z;
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 many(0);
anatofuz
parents:
diff changeset
26 struct many m;
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 noret();
anatofuz
parents:
diff changeset
29 }