blob: 975a8cf8bb54d7715e0ac17aef1f3755b37b4281 [file] [log] [blame]
Reid Kleckner2918a202017-05-31 20:02:27 +00001// 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
Reid Kleckner1d4cde62017-05-31 20:07:36 +000016// RUN: not %clang_cl -fms-compatibility-version=19 /diagnostics:classic /Zs -c -- %s 2>&1 | FileCheck %s --check-prefix=OUTPUT_CLASSIC
Reid Kleckner2918a202017-05-31 20:02:27 +000017
18// OUTPUT_CLASSIC: cl-diagnostics.c({{[0-9]+}}): error: "asdf"
19// OUTPUT_CLASSIC-NOT: #error
20
Reid Kleckner1d4cde62017-05-31 20:07:36 +000021// RUN: not %clang_cl -fms-compatibility-version=19 /diagnostics:caret /Zs -c -- %s 2>&1 | FileCheck %s --check-prefix=OUTPUT_CARET
Reid Kleckner2918a202017-05-31 20:02:27 +000022
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"