85 lines · c
1// RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \2// RUN: -E -H -o /dev/null %s 2> %t.stderr3// RUN: FileCheck < %t.stderr %s4 5// CHECK-NOT: test3.h6// 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.stderr13// RUN: FileCheck --check-prefix=SKIPPED < %t.stderr %s14 15// SKIPPED-NOT: . {{.*noline.h}}16// SKIPPED: . {{.*test.h}}17// SKIPPED: .. {{.*test2.h}}18// SKIPPED: .. {{.*test2.h}}19 20// RUN: %clang_cc1 -isystem %S -isystem %S/Inputs/SystemHeaderPrefix \21// RUN: -E -H -fshow-skipped-includes -sys-header-deps -o /dev/null %s 2> %t.stderr22// RUN: FileCheck --check-prefix=SKIPPED-SYS < %t.stderr %s23 24// SKIPPED-SYS: . {{.*noline.h}}25// SKIPPED-SYS: . {{.*test.h}}26// SKIPPED-SYS: .. {{.*test2.h}}27// SKIPPED-SYS: .. {{.*test2.h}}28 29// RUN: %clang_cc1 -I%S -isystem %S/Inputs/SystemHeaderPrefix -include Inputs/test.h \30// RUN: -E -H -fshow-skipped-includes -o /dev/null %s 2> %t.stderr31// RUN: FileCheck --check-prefix=SKIPPED-PREDEFINES < %t.stderr %s32 33// The skipped include of test2.h from the -include test.h shouldn't be printed.34// SKIPPED-PREDEFINES-NOT: {{.*test2.h}}35// SKIPPED-PREDEFINES: . {{.*test.h}}36 37// RUN: %clang_cc1 -isystem %S -isystem %S/Inputs/SystemHeaderPrefix \38// RUN: -E -H -fshow-skipped-includes -o /dev/null %s 2> %t.stderr39// RUN: FileCheck --check-prefix=SKIPPED-NO-SYS --allow-empty < %t.stderr %s40 41// SKIPPED-NO-SYS-NOT: .42 43// RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \44// RUN: -E -H -sys-header-deps -o /dev/null %s 2> %t.stderr45// RUN: FileCheck --check-prefix SYSHEADERS < %t.stderr %s46 47// SYSHEADERS-NOT: test3.h48// SYSHEADERS: . {{.*noline.h}}49// SYSHEADERS: . {{.*test.h}}50// SYSHEADERS: .. {{.*test2.h}}51 52// RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \53// RUN: --show-includes -o /dev/null %s | \54// RUN: FileCheck --strict-whitespace --check-prefix=MS-STDOUT %s55// MS-STDOUT-NOT: <command line>56// MS-STDOUT-NOT: Note: including file: {{[^ ]*noline.h}}57// MS-STDOUT: Note: including file: {{[^ ]*test3.h}}58// MS-STDOUT: Note: including file: {{[^ ]*test.h}}59// MS-STDOUT: Note: including file: {{[^ ]*test2.h}}60// MS-STDOUT-NOT: Note61 62// RUN: %clang_cc1 -I%S -include Inputs/test3.h -isystem %S/Inputs/SystemHeaderPrefix \63// RUN: -E --show-includes -o /dev/null %s 2> %t.stderr64// RUN: FileCheck --strict-whitespace --check-prefix=MS-STDERR < %t.stderr %s65// MS-STDERR-NOT: <command line>66// MS-STDERR-NOT: Note: including file: {{[^ ]*noline.h}}67// MS-STDERR: Note: including file: {{[^ ]*test3.h}}68// MS-STDERR: Note: including file: {{[^ ]*test.h}}69// MS-STDERR: Note: including file: {{[^ ]*test2.h}}70// MS-STDERR-NOT: Note71 72// RUN: echo "fun:foo" > %t.ignorelist73// RUN: %clang_cc1 -I%S -isystem %S/Inputs/SystemHeaderPrefix \74// RUN: -fsanitize=address -fdepfile-entry=%t.ignorelist \75// RUN: --show-includes -o /dev/null %s | \76// RUN: FileCheck --strict-whitespace --check-prefix=MS-IGNORELIST %s77// MS-IGNORELIST: Note: including file: {{[^ ]*\.ignorelist}}78// MS-IGNORELIST-NOT: Note: including file: {{[^ ]*noline.h}}79// MS-IGNORELIST: Note: including file: {{[^ ]*test.h}}80// MS-IGNORELIST: Note: including file: {{[^ ]*test2.h}}81// MS-IGNORELIST-NOT: Note82 83#include <noline.h>84#include <Inputs/test.h>85