[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / clang / test / VFS / external-names-multi-overlay.c
blobf4e6c864378830f75c95bcbb7b13f21f23f49d63
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s@NAME_DIR@%{/t:regex_replacement}/A@g" -e "s@EXTERNAL_DIR@%{/t:regex_replacement}/B@g" -e "s@REDIRECT_WITH@fallthrough@g" %t/vfs/base.yaml > %t/vfs/a-b-ft.yaml
4 // RUN: sed -e "s@NAME_DIR@%{/t:regex_replacement}/A@g" -e "s@EXTERNAL_DIR@%{/t:regex_replacement}/B@g" -e "s@REDIRECT_WITH@fallback@g" %t/vfs/base.yaml > %t/vfs/a-b-fb.yaml
6 // Check that the external name is given when multiple overlays are provided
8 // RUN: %clang_cc1 -Werror -I %t/A -ivfsoverlay %t/vfs/a-b-ft.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s
9 // RUN: %clang_cc1 -Werror -I %t/A -ivfsoverlay %t/vfs/a-b-fb.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s
10 // RUN: %clang_cc1 -Werror -I %t/B -ivfsoverlay %t/vfs/a-b-ft.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s
11 // RUN: %clang_cc1 -Werror -I %t/B -ivfsoverlay %t/vfs/a-b-fb.yaml -ivfsoverlay %t/vfs/empty.yaml -E -C %t/main.c 2>&1 | FileCheck --check-prefix=FROM_B %s
12 // FROM_B: # 1 "{{.*(/|\\\\)B(/|\\\\)}}Header.h"
13 // FROM_B: // Header.h in B
15 //--- main.c
16 #include "Header.h"
18 //--- B/Header.h
19 // Header.h in B
21 //--- vfs/base.yaml
23 'version': 0,
24 'redirecting-with': 'REDIRECT_WITH',
25 'roots': [
26 { 'name': 'NAME_DIR',
27 'type': 'directory-remap',
28 'external-contents': 'EXTERNAL_DIR'
33 //--- vfs/empty.yaml
35 'version': 0,
36 'roots': []