2016-03-13 03:55:59 +08:00
|
|
|
// Note: %s and %S must be preceded by --, otherwise it may be interpreted as a
|
|
|
|
// command-line option, e.g. on Mac where %s is commonly under /Users.
|
|
|
|
|
|
|
|
// Tests interaction of /Yc / /Yu with /showIncludes
|
|
|
|
|
|
|
|
#include "header3.h"
|
|
|
|
|
|
|
|
// When building the pch, header1.h (included by header2.h), header2.h (the pch
|
|
|
|
// input itself) and header3.h (included directly, above) should be printed.
|
|
|
|
// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=CHECK-YC %s
|
2016-03-13 10:48:51 +08:00
|
|
|
// CHECK-YC: Note: including file: {{.+header2.h}}
|
|
|
|
// CHECK-YC: Note: including file: {{.+header1.h}}
|
|
|
|
// CHECK-YC: Note: including file: {{.+header3.h}}
|
2016-03-13 03:55:59 +08:00
|
|
|
|
|
|
|
// When using the pch, only the direct include is printed.
|
|
|
|
// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Yuheader2.h /FIheader2.h /Fp%t.pch /c -- %s 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefix=CHECK-YU %s
|
2016-03-13 11:04:46 +08:00
|
|
|
// CHECK-YU-NOT: Note: including file: {{.*pch}}
|
2016-03-13 03:55:59 +08:00
|
|
|
// CHECK-YU-NOT: Note: including file: {{.*header1.h}}
|
|
|
|
// CHECK-YU-NOT: Note: including file: {{.*header2.h}}
|
2016-03-13 10:48:51 +08:00
|
|
|
// CHECK-YU: Note: including file: {{.+header3.h}}
|