xref: /llvm-project/clang/test/VFS/module_missing_vfs.m (revision 7d644e1215b376ec5e915df9ea2eeb56e2d94626)
1// RUN: rm -rf %t && mkdir -p %t
2// RUN: echo "void funcA(void);" >> %t/a.h
3
4// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/mcp -I %S/Inputs/MissingVFS %s -fsyntax-only -ivfsoverlay %t/vfs.yaml 2>&1 | FileCheck %s -check-prefix=ERROR
5// ERROR: virtual filesystem overlay file '{{.*}}' not found
6// RUN: find %t/mcp -name "A-*.pcm" | count 1
7
8// RUN: sed -e "s@INPUT_DIR@%{/S:regex_replacement}/Inputs@g" -e "s@OUT_DIR@%{/t:regex_replacement}@g" %S/Inputs/MissingVFS/vfsoverlay.yaml > %t/vfs.yaml
9// RUN: %clang_cc1 -Wno-error=implicit-function-declaration -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/mcp -I %S/Inputs/MissingVFS %s -fsyntax-only -ivfsoverlay %t/vfs.yaml
10// RUN: find %t/mcp -name "A-*.pcm" | count 1
11
12@import A;
13void test(void) {
14  funcA();
15}
16