Nico Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 1 | // 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 Weber | efe190a | 2016-03-13 02:48:51 +0000 | [diff] [blame] | 12 | // CHECK-YC: Note: including file: {{.+header2.h}} |
| 13 | // CHECK-YC: Note: including file: {{.+header1.h}} |
| 14 | // CHECK-YC: Note: including file: {{.+header3.h}} |
Nico Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 15 | |
| 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 Weber | deed64e | 2016-03-13 03:04:46 +0000 | [diff] [blame^] | 19 | // CHECK-YU-NOT: Note: including file: {{.*pch}} |
Nico Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 20 | // CHECK-YU-NOT: Note: including file: {{.*header1.h}} |
| 21 | // CHECK-YU-NOT: Note: including file: {{.*header2.h}} |
Nico Weber | efe190a | 2016-03-13 02:48:51 +0000 | [diff] [blame] | 22 | // CHECK-YU: Note: including file: {{.+header3.h}} |