blob: a78e60e9ba4a68dd2bc6c8c6c959f1248b69073a [file] [log] [blame]
Nico Weber1f8bad52016-03-12 19:55:59 +00001// Note: %s and %S must be preceded by --, otherwise it may be interpreted as a
2// command-line option, e.g. on Mac where %s is commonly under /Users.
3
4// Tests interaction of /Yc / /Yu with /showIncludes
Nico Weber627fa8e2016-03-13 22:26:26 +00005// REQUIRES: x86-registered-target
Nico Weber1f8bad52016-03-12 19:55:59 +00006
7#include "header3.h"
8
9// When building the pch, header1.h (included by header2.h), header2.h (the pch
10// input itself) and header3.h (included directly, above) should be printed.
11// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
12// RUN: | FileCheck -check-prefix=CHECK-YC %s
Nico Weberefe190a2016-03-13 02:48:51 +000013// CHECK-YC: Note: including file: {{.+header2.h}}
14// CHECK-YC: Note: including file: {{.+header1.h}}
15// CHECK-YC: Note: including file: {{.+header3.h}}
Nico Weber1f8bad52016-03-12 19:55:59 +000016
17// When using the pch, only the direct include is printed.
18// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Yuheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
19// RUN: | FileCheck -check-prefix=CHECK-YU %s
Nico Weberdeed64e2016-03-13 03:04:46 +000020// CHECK-YU-NOT: Note: including file: {{.*pch}}
Nico Weber1f8bad52016-03-12 19:55:59 +000021// CHECK-YU-NOT: Note: including file: {{.*header1.h}}
22// CHECK-YU-NOT: Note: including file: {{.*header2.h}}
Nico Weberefe190a2016-03-13 02:48:51 +000023// CHECK-YU: Note: including file: {{.+header3.h}}