blob: 9ebe68899db02f754584809c866e749752f3423c [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.
Nico Weber149d95222016-03-23 18:00:22 +000011// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader2.h /Fp%t.pch /c /Fo%t -- %s \
12// RUN: | FileCheck --strict-whitespace -check-prefix=CHECK-YC %s
13// CHECK-YC: Note: including file: {{[^ ]*header2.h}}
14// FIXME: header1.h should be indented one more:
15// CHECK-YC: Note: including file: {{[^ ]*header1.h}}
16// CHECK-YC: Note: including file: {{[^ ]*header3.h}}
Nico Weber1f8bad52016-03-12 19:55:59 +000017
18// When using the pch, only the direct include is printed.
Nico Weber149d95222016-03-23 18:00:22 +000019// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Yuheader2.h /FIheader2.h /Fp%t.pch /c /Fo%t -- %s \
20// RUN: | FileCheck --strict-whitespace -check-prefix=CHECK-YU %s
Nico Weberdeed64e2016-03-13 03:04:46 +000021// CHECK-YU-NOT: Note: including file: {{.*pch}}
Nico Weber1f8bad52016-03-12 19:55:59 +000022// CHECK-YU-NOT: Note: including file: {{.*header1.h}}
23// CHECK-YU-NOT: Note: including file: {{.*header2.h}}
Nico Weber149d95222016-03-23 18:00:22 +000024// CHECK-YU: Note: including file: {{[^ ]*header3.h}}