1 | // Note: %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 | // RUN: %clang_cl /diagnostics:classic -### -- %s 2>&1 | FileCheck %s --check-prefix=CLASSIC |
5 | // CLASSIC: -fno-caret-diagnostics |
6 | // CLASSIC: -fno-show-column |
7 | |
8 | // RUN: %clang_cl /diagnostics:column -### -- %s 2>&1 | FileCheck %s --check-prefix=COLUMN |
9 | // COLUMN: -fno-caret-diagnostics |
10 | // COLUMN-NOT: -fno-show-column |
11 | |
12 | // RUN: %clang_cl /diagnostics:caret -### -- %s 2>&1 | FileCheck %s --check-prefix=CARET |
13 | // CARET-NOT: -fno-caret-diagnostics |
14 | // CARET-NOT: -fno-show-column |
15 | |
16 | // RUN: not %clang_cl -fms-compatibility-version=19 /diagnostics:classic /Zs -c -- %s 2>&1 | FileCheck %s --check-prefix=OUTPUT_CLASSIC |
17 | |
18 | // OUTPUT_CLASSIC: cl-diagnostics.c({{[0-9]+}}): error: "asdf" |
19 | // OUTPUT_CLASSIC-NOT: #error |
20 | |
21 | // RUN: not %clang_cl -fms-compatibility-version=19 /diagnostics:caret /Zs -c -- %s 2>&1 | FileCheck %s --check-prefix=OUTPUT_CARET |
22 | |
23 | // OUTPUT_CARET: cl-diagnostics.c({{[0-9]+,[0-9]+}}): error: "asdf" |
24 | // OUTPUT_CARET-NEXT: #error "asdf" |
25 | // OUTPUT_CARET-NEXT: ^ |
26 | |
27 | |
28 | #error "asdf" |
29 | |