1 // RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \
2 // RUN:     -E -H -o /dev/null %s 2> %t.stderr
3 // RUN: FileCheck < %t.stderr %s
4 
5 // CHECK-NOT: test3.h
6 // CHECK-NOT: . {{.*noline.h}}
7 // CHECK: . {{.*test.h}}
8 // CHECK: .. {{.*test2.h}}
9 // CHECK-NOT: .. {{.*test2.h}}
10 
11 // RUN: %clang_cc1 -I%S -isystem %S/Inputs/SystemHeaderPrefix \
12 // RUN:     -E -H -fshow-skipped-includes -o /dev/null %s 2> %t.stderr
13 // RUN: FileCheck --check-prefix=SKIPPED < %t.stderr %s
14 
15 // SKIPPED-NOT: . {{.*noline.h}}
16 // SKIPPED: . {{.*test.h}}
17 // SKIPPED: .. {{.*test2.h}}
18 // SKIPPED: .. {{.*test2.h}}
19 
20 // RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \
21 // RUN:     -E -H -sys-header-deps -o /dev/null %s 2> %t.stderr
22 // RUN: FileCheck --check-prefix SYSHEADERS < %t.stderr %s
23 
24 // SYSHEADERS-NOT: test3.h
25 // SYSHEADERS: . {{.*noline.h}}
26 // SYSHEADERS: . {{.*test.h}}
27 // SYSHEADERS: .. {{.*test2.h}}
28 
29 // RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \
30 // RUN:     --show-includes -o /dev/null %s | \
31 // RUN:     FileCheck --strict-whitespace --check-prefix=MS-STDOUT %s
32 // MS-STDOUT-NOT: <command line>
33 // MS-STDOUT-NOT: Note: including file: {{[^ ]*noline.h}}
34 // MS-STDOUT: Note: including file: {{[^ ]*test3.h}}
35 // MS-STDOUT: Note: including file: {{[^ ]*test.h}}
36 // MS-STDOUT: Note: including file:  {{[^ ]*test2.h}}
37 // MS-STDOUT-NOT: Note
38 
39 // RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \
40 // RUN:     -E --show-includes -o /dev/null %s 2> %t.stderr
41 // RUN: FileCheck --strict-whitespace --check-prefix=MS-STDERR < %t.stderr %s
42 // MS-STDERR-NOT: <command line>
43 // MS-STDERR-NOT: Note: including file: {{[^ ]*noline.h}}
44 // MS-STDERR: Note: including file: {{[^ ]*test3.h}}
45 // MS-STDERR: Note: including file: {{[^ ]*test.h}}
46 // MS-STDERR: Note: including file:  {{[^ ]*test2.h}}
47 // MS-STDERR-NOT: Note
48 
49 // RUN: echo "fun:foo" > %t.ignorelist
50 // RUN: %clang_cc1 -I%S -isystem %S/Inputs/SystemHeaderPrefix \
51 // RUN:     -fsanitize=address -fdepfile-entry=%t.ignorelist \
52 // RUN:     --show-includes -o /dev/null %s | \
53 // RUN:     FileCheck --strict-whitespace --check-prefix=MS-IGNORELIST %s
54 // MS-IGNORELIST: Note: including file: {{[^ ]*\.ignorelist}}
55 // MS-IGNORELIST-NOT: Note: including file: {{[^ ]*noline.h}}
56 // MS-IGNORELIST: Note: including file: {{[^ ]*test.h}}
57 // MS-IGNORELIST: Note: including file:  {{[^ ]*test2.h}}
58 // MS-IGNORELIST-NOT: Note
59 
60 #include <noline.h>
61 #include "Inputs/test.h"
62