| 1 | // Through header not found (anywhere) |
| 2 | // RUN: not %clang_cc1 -emit-pch \ |
| 3 | // RUN: -pch-through-header=Inputs/pch-does-not-exist.h -o %t %s 2>&1 \ |
| 4 | // RUN: | FileCheck -check-prefix=CHECK-TEST0A %s |
| 5 | // CHECK-TEST0A: fatal error:{{.*}} 'Inputs/pch-does-not-exist.h' |
| 6 | // CHECK-TEST0A-SAME: required for precompiled header not found |
| 7 | |
| 8 | // Through header not found in search path |
| 9 | // RUN: not %clang_cc1 -emit-pch \ |
| 10 | // RUN: -pch-through-header=Inputs/pch-through2.h -o %t \ |
| 11 | // RUN: %S/Inputs/pch-through-use0.cpp 2>&1 \ |
| 12 | // RUN: | FileCheck -check-prefix=CHECK-TEST0B %s |
| 13 | // CHECK-TEST0B: fatal error:{{.*}}'Inputs/pch-through2.h' |
| 14 | // CHECK-TEST0B-SAME: required for precompiled header not found |
| 15 | |
| 16 | // No #include of through header during pch create |
| 17 | // RUN: not %clang_cc1 -I %S -emit-pch \ |
| 18 | // RUN: -pch-through-header=Inputs/pch-through2.h -o %t %s 2>&1 \ |
| 19 | // RUN: | FileCheck -check-prefix=CHECK-TEST1A %s |
| 20 | // CHECK-TEST1A: fatal error:{{.*}} #include of |
| 21 | // CHECK-TEST1A-SAME: 'Inputs/pch-through2.h' not seen while attempting to |
| 22 | // CHECK-TEST1A-SAME: create precompiled header |
| 23 | |
| 24 | // checks for through headers that are also -includes |
| 25 | // RUN: %clang_cc1 -I %S -include Inputs/pch-through1.h \ |
| 26 | // RUN: -pch-through-header=Inputs/pch-through1.h -emit-pch -o %t.s3t1 %s |
| 27 | // RUN: %clang_cc1 -I %S -include Inputs/pch-through1.h \ |
| 28 | // RUN: -include Inputs/pch-through2.h -include Inputs/pch-through3.h \ |
| 29 | // RUN: -pch-through-header=Inputs/pch-through2.h -emit-pch -o %t.s3t2 %s |
| 30 | // Use through header from -includes |
| 31 | // RUN: %clang_cc1 -I %S -include Inputs/pch-through1.h \ |
| 32 | // RUN: -include Inputs/pch-through2.h -include Inputs/pch-through4.h \ |
| 33 | // RUN: -pch-through-header=Inputs/pch-through2.h -include-pch %t.s3t2 \ |
| 34 | // RUN: %S/Inputs/pch-through-use2.cpp -o %t.out |
| 35 | |