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 |
Nico Weber | 627fa8e | 2016-03-13 22:26:26 +0000 | [diff] [blame] | 5 | // REQUIRES: x86-registered-target |
Nico Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 6 | |
| 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 Weber | 149d9522 | 2016-03-23 18:00:22 +0000 | [diff] [blame^] | 11 | // 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 Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 17 | |
| 18 | // When using the pch, only the direct include is printed. |
Nico Weber | 149d9522 | 2016-03-23 18:00:22 +0000 | [diff] [blame^] | 19 | // 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 Weber | deed64e | 2016-03-13 03:04:46 +0000 | [diff] [blame] | 21 | // CHECK-YU-NOT: Note: including file: {{.*pch}} |
Nico Weber | 1f8bad5 | 2016-03-12 19:55:59 +0000 | [diff] [blame] | 22 | // CHECK-YU-NOT: Note: including file: {{.*header1.h}} |
| 23 | // CHECK-YU-NOT: Note: including file: {{.*header2.h}} |
Nico Weber | 149d9522 | 2016-03-23 18:00:22 +0000 | [diff] [blame^] | 24 | // CHECK-YU: Note: including file: {{[^ ]*header3.h}} |