Volodymyr Sapsai | f239a44 | 2018-10-26 22:16:24 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir -p %t |
Daniel Sanders | 3278948 | 2019-12-03 15:22:30 -0800 | [diff] [blame] | 3 | // RUN: sed -e "s@TEST_DIR@%{/S:regex_replacement}@g" -e "s@OUT_DIR@%{/t:regex_replacement}@g" %S/Inputs/vfsroot.yaml > %t.yaml |
Volodymyr Sapsai | f239a44 | 2018-10-26 22:16:24 +0000 | [diff] [blame] | 4 | // RUN: not %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %S/Inputs -I /direct-vfs-root-files -fsyntax-only /tests/vfsroot-include.c 2>&1 | FileCheck %s |
| 5 | // The line above tests that the compiler input file is looked up through VFS. |
| 6 | |
| 7 | // Test successful include through the VFS. |
| 8 | #include "not_real.h" |
| 9 | |
| 10 | // Test that a file missing from the VFS root is not found, even if it is |
| 11 | // discoverable through the real file system. Fatal error should be the last |
| 12 | // in the file as it hides other errors. |
| 13 | #include "actual_header.h" |
| 14 | // CHECK: fatal error: 'actual_header.h' file not found |
| 15 | // CHECK: 1 error generated. |
| 16 | // CHECK-NOT: error |