brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 6bf7a29 Raw
29 lines · cpp
1// Create2// RUN: %clang_cc1 -I %S -emit-pch \3// RUN:   -pch-through-header=Inputs/pch-through2.h -o %t.1 %s4 5// Use6// RUN: %clang_cc1 -I %S -include-pch %t.1 \7// RUN:   -pch-through-header=Inputs/pch-through2.h %s8 9// No #include of through header during pch use10// RUN: not %clang_cc1 -I %S -include-pch %t.1 \11// RUN:   -pch-through-header=Inputs/pch-through2.h \12// RUN:   %S/Inputs/pch-through-use1.cpp 2>&1 \13// RUN:   | FileCheck -check-prefix=CHECK-TEST2A %s14// CHECK-TEST2A: fatal error:{{.*}} #include of15// CHECK-TEST2A-SAME: 'Inputs/pch-through2.h' not seen while attempting to16// CHECK-TEST2A-SAME: use precompiled header17 18// check that pch only contains code before the through header.19// RUN: %clang_cc1 -I %S -emit-pch \20// RUN:   -pch-through-header=Inputs/pch-through1.h -o %t.2 %s21// RUN: not %clang_cc1 -I %S -include-pch %t.2 \22// RUN:   -pch-through-header=Inputs/pch-through1.h \23// RUN:   %S/Inputs/pch-through-use1.cpp 2>&1 \24// RUN:   | FileCheck -check-prefix=CHECK-TEST3 %s25// CHECK-TEST3: error: use of undeclared identifier 'through2'26 27#include "Inputs/pch-through1.h"28#include "Inputs/pch-through2.h"29