annotate clang/test/PCH/pch-through2.cpp @ 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Create
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -I %S -emit-pch \
anatofuz
parents:
diff changeset
3 // RUN: -pch-through-header=Inputs/pch-through2.h -o %t.1 %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // Use
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -I %S -include-pch %t.1 \
anatofuz
parents:
diff changeset
7 // RUN: -pch-through-header=Inputs/pch-through2.h %s
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 // No #include of through header during pch use
anatofuz
parents:
diff changeset
10 // RUN: not %clang_cc1 -I %S -include-pch %t.1 \
anatofuz
parents:
diff changeset
11 // RUN: -pch-through-header=Inputs/pch-through2.h \
anatofuz
parents:
diff changeset
12 // RUN: %S/Inputs/pch-through-use1.cpp 2>&1 \
anatofuz
parents:
diff changeset
13 // RUN: | FileCheck -check-prefix=CHECK-TEST2A %s
anatofuz
parents:
diff changeset
14 // CHECK-TEST2A: fatal error:{{.*}} #include of
anatofuz
parents:
diff changeset
15 // CHECK-TEST2A-SAME: 'Inputs/pch-through2.h' not seen while attempting to
anatofuz
parents:
diff changeset
16 // CHECK-TEST2A-SAME: use precompiled header
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 // check that pch only contains code before the through header.
anatofuz
parents:
diff changeset
19 // RUN: %clang_cc1 -I %S -emit-pch \
anatofuz
parents:
diff changeset
20 // RUN: -pch-through-header=Inputs/pch-through1.h -o %t.2 %s
anatofuz
parents:
diff changeset
21 // RUN: not %clang_cc1 -I %S -include-pch %t.2 \
anatofuz
parents:
diff changeset
22 // RUN: -pch-through-header=Inputs/pch-through1.h \
anatofuz
parents:
diff changeset
23 // RUN: %S/Inputs/pch-through-use1.cpp 2>&1 \
anatofuz
parents:
diff changeset
24 // RUN: | FileCheck -check-prefix=CHECK-TEST3 %s
anatofuz
parents:
diff changeset
25 // CHECK-TEST3: error: use of undeclared identifier 'through2'
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 #include "Inputs/pch-through1.h"
anatofuz
parents:
diff changeset
28 #include "Inputs/pch-through2.h"