[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / crash-vfs-headermaps.m
blob0afa0dee63792c09983f489e00a50047554e47af
1 // REQUIRES: crash-recovery, shell, system-darwin
3 // RUN: rm -rf %t
4 // RUN: mkdir -p %t/m %t/i/Foo.framework/Headers
5 // RUN: echo '// Foo.h' > %t/i/Foo.framework/Headers/Foo.h
6 // RUN: %hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
8 // RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
9 // RUN: not %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
10 // RUN:     -I %t/i/foo.hmap -F %t/i 2>&1 | FileCheck %s
12 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh
13 // RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \
14 // RUN:   %t/crash-vfs-*.cache/vfs/vfs.yaml
16 #include "Foo.h"
17 #include "Foo.h"
19 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
20 // CHECK-NEXT: note: diagnostic msg: {{.*}}.m
21 // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
23 // CHECKSH: # Crash reproducer
24 // CHECKSH-NEXT: # Driver args: "-fsyntax-only"
25 // CHECKSH-NEXT: # Original command: {{.*$}}
26 // CHECKSH-NEXT: "-cc1"
27 // CHECKSH: "-I" "/[[INCPATH:.*]]/foo.hmap"
28 // CHECKSH: "crash-vfs-{{[^ ]*}}.m"
29 // CHECKSH: "-ivfsoverlay" "crash-vfs-{{[^ ]*}}.cache/vfs/vfs.yaml"
30 // CHECKSH: "-fmodules-cache-path=crash-vfs-{{[^ ]*}}.cache/repro-modules"
32 // CHECKYAML: 'case-sensitive':
33 // CHECKYAML-NEXT: 'use-external-names': 'false',
34 // CHECKYAML-NEXT: 'overlay-relative': 'true',
35 // CHECKYAML: 'type': 'directory'
36 // CHECKYAML: 'name': "/[[PATH:.*]]/Foo.framework/Headers",
37 // CHECKYAML-NEXT: 'contents': [
38 // CHECKYAML-NEXT:   {
39 // CHECKYAML-NEXT:     'type': 'file',
40 // CHECKYAML-NEXT:     'name': "Foo.h",
41 // CHECKYAML-NEXT:     'external-contents': "/[[PATH]]/Foo.framework/Headers/Foo.h"
42 // CHECKYAML: 'type': 'directory'
43 // CHECKYAML: 'name': "/[[PATH:.*]]/i",
44 // CHECKYAML-NEXT: 'contents': [
45 // CHECKYAML-NEXT:   {
46 // CHECKYAML-NEXT:     'type': 'file',
47 // CHECKYAML-NEXT:     'name': "foo.hmap",
48 // CHECKYAML-NEXT:     'external-contents': "/[[PATH]]/i/foo.hmap"