blob: dd7807546c052d522345dc5044633b675783d8b6 [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
5
6#include "header3.h"
7
8// When building the pch, header1.h (included by header2.h), header2.h (the pch
9// input itself) and header3.h (included directly, above) should be printed.
10// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
11// RUN: | FileCheck -check-prefix=CHECK-YC %s
Nico Weberefe190a2016-03-13 02:48:51 +000012// CHECK-YC: Note: including file: {{.+header2.h}}
13// CHECK-YC: Note: including file: {{.+header1.h}}
14// CHECK-YC: Note: including file: {{.+header3.h}}
Nico Weber1f8bad52016-03-12 19:55:59 +000015
16// When using the pch, only the direct include is printed.
17// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Yuheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
18// RUN: | FileCheck -check-prefix=CHECK-YU %s
Nico Weberdeed64e2016-03-13 03:04:46 +000019// CHECK-YU-NOT: Note: including file: {{.*pch}}
Nico Weber1f8bad52016-03-12 19:55:59 +000020// CHECK-YU-NOT: Note: including file: {{.*header1.h}}
21// CHECK-YU-NOT: Note: including file: {{.*header2.h}}
Nico Weberefe190a2016-03-13 02:48:51 +000022// CHECK-YU: Note: including file: {{.+header3.h}}