Clang Project

clang_source_code/test/Frontend/print-header-includes.c
1// RUN: %clang_cc1 -I%S -include Inputs/test3.h -E -H -o /dev/null %s 2> %t.stderr
2// RUN: FileCheck < %t.stderr %s
3
4// CHECK-NOT: test3.h
5// CHECK: . {{.*test.h}}
6// CHECK: .. {{.*test2.h}}
7
8// RUN: %clang_cc1 -I%S -include Inputs/test3.h --show-includes -o /dev/null %s | \
9// RUN:     FileCheck --strict-whitespace --check-prefix=MS-STDOUT %s
10// MS-STDOUT-NOT: <command line>
11// MS-STDOUT: Note: including file: {{[^ ]*test3.h}}
12// MS-STDOUT: Note: including file: {{[^ ]*test.h}}
13// MS-STDOUT: Note: including file:  {{[^ ]*test2.h}}
14// MS-STDOUT-NOT: Note
15
16// RUN: %clang_cc1 -I%S -include Inputs/test3.h -E --show-includes -o /dev/null %s 2> %t.stderr
17// RUN: FileCheck --strict-whitespace --check-prefix=MS-STDERR < %t.stderr %s
18// MS-STDERR-NOT: <command line>
19// MS-STDERR: Note: including file: {{[^ ]*test3.h}}
20// MS-STDERR: Note: including file: {{[^ ]*test.h}}
21// MS-STDERR: Note: including file:  {{[^ ]*test2.h}}
22// MS-STDERR-NOT: Note
23
24// RUN: echo "fun:foo" > %t.blacklist
25// RUN: %clang_cc1 -I%S -fsanitize=address -fdepfile-entry=%t.blacklist --show-includes -o /dev/null %s | \
26// RUN:     FileCheck --strict-whitespace --check-prefix=MS-BLACKLIST %s
27// MS-BLACKLIST: Note: including file: {{[^ ]*\.blacklist}}
28// MS-BLACKLIST: Note: including file: {{[^ ]*test.h}}
29// MS-BLACKLIST: Note: including file:  {{[^ ]*test2.h}}
30// MS-BLACKLIST-NOT: Note
31
32#include "Inputs/test.h"
33