1 // Test reading of PCH without original input files.
3 // Generate the PCH, removing the original file:
4 // RUN: echo 'struct S{char c; int i; }; void foo() {}' > %t.h
5 // RUN: echo 'template <typename T> void tf() { T::foo(); }' >> %t.h
6 // RUN: %clang_cc1 -x c++ -emit-pch -o %t.h.pch %t.h
9 // Check diagnostic with location in original source:
10 // RUN: not %clang_cc1 -include-pch %t.h.pch -emit-obj -o %t.o %s 2> %t.stderr
11 // RUN: grep 'could not find file' %t.stderr
13 // Oftentimes on Windows there are open handles, and deletion will fail.
14 // REQUIRES: can-remove-opened-file
19 float foo() {return 0f
;}