blob: 26496293201e4139ec27944019a80f745e8cfd72 [file] [log] [blame]
Nico Weberca18fe12014-12-23 22:55:34 +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 /c -### -- %s 2>&1 | FileCheck -check-prefix=TRIGRAPHS-DEFAULT %s
5// cc1 will disable trigraphs for -fms-compatibility as long as -ftrigraphs
6// isn't explicitly passed.
7// TRIGRAPHS-DEFAULT-NOT: "-ftrigraphs"
8
9// RUN: %clang_cl /c -### /Zc:trigraphs -- %s 2>&1 | FileCheck -check-prefix=TRIGRAPHS-ON %s
10// TRIGRAPHS-ON: "-ftrigraphs"
11
12// RUN: %clang_cl /c -### /Zc:trigraphs- -- %s 2>&1 | FileCheck -check-prefix=TRIGRAPHS-OFF %s
13// TRIGRAPHS-OFF: "-fno-trigraphs"
14
David Majnemer02ddd7f2015-05-14 05:55:00 +000015// RUN: %clang_cl /c -### /Zc:sizedDealloc -- %s 2>&1 | FileCheck -check-prefix=SIZED-DEALLOC-ON %s
16// SIZED-DEALLOC-ON: "-fsized-deallocation"
17
18// RUN: %clang_cl /c -### /Zc:sizedDealloc- -- %s 2>&1 | FileCheck -check-prefix=SIZED-DEALLOC-OFF %s
19// SIZED-DEALLOC-OFF-NOT: "-fsized-deallocation"
20
Nico Weberca18fe12014-12-23 22:55:34 +000021// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=STRICTSTRINGS-DEFAULT %s
22// STRICTSTRINGS-DEFAULT-NOT: -Werror=c++11-compat-deprecated-writable-strings
23// RUN: %clang_cl /c -### /Zc:strictStrings -- %s 2>&1 | FileCheck -check-prefix=STRICTSTRINGS-ON %s
24// STRICTSTRINGS-ON: -Werror=c++11-compat-deprecated-writable-strings
25// RUN: %clang_cl /c -### /Zc:strictStrings- -- %s 2>&1 | FileCheck -check-prefix=STRICTSTRINGS-OFF %s
26// STRICTSTRINGS-OFF: argument unused during compilation
27
28
29// RUN: %clang_cl /c -### /Zc:foobar -- %s 2>&1 | FileCheck -check-prefix=FOOBAR-ON %s
30// FOOBAR-ON: argument unused during compilation
31// RUN: %clang_cl /c -### /Zc:foobar- -- %s 2>&1 | FileCheck -check-prefix=FOOBAR-ON %s
32// FOOBAR-OFF: argument unused during compilation
33
34// These are ignored if enabled, and warn if disabled.
35
36// RUN: %clang_cl /c -### /Zc:forScope -- %s 2>&1 | FileCheck -check-prefix=FORSCOPE-ON %s
37// FORSCOPE-ON-NOT: argument unused during compilation
38// RUN: %clang_cl /c -### /Zc:forScope- -- %s 2>&1 | FileCheck -check-prefix=FORSCOPE-OFF %s
39// FORSCOPE-OFF: argument unused during compilation
40
41// RUN: %clang_cl /c -### /Zc:wchar_t -- %s 2>&1 | FileCheck -check-prefix=WCHAR_T-ON %s
42// WCHAR_T-ON-NOT: argument unused during compilation
43// RUN: %clang_cl /c -### /Zc:wchar_t- -- %s 2>&1 | FileCheck -check-prefix=WCHAR_T-OFF %s
44// WCHAR_T-OFF: argument unused during compilation
45
46// RUN: %clang_cl /c -### /Zc:auto -- %s 2>&1 | FileCheck -check-prefix=AUTO-ON %s
47// AUTO-ON-NOT: argument unused during compilation
48// RUN: %clang_cl /c -### /Zc:auto- -- %s 2>&1 | FileCheck -check-prefix=AUTO-OFF %s
49// AUTO-OFF: argument unused during compilation
50
51// RUN: %clang_cl /c -### /Zc:inline -- %s 2>&1 | FileCheck -check-prefix=INLINE-ON %s
52// INLINE-ON-NOT: argument unused during compilation
53// RUN: %clang_cl /c -### /Zc:inline- -- %s 2>&1 | FileCheck -check-prefix=INLINE-OFF %s
54// INLINE-OFF: argument unused during compilation
55
56
57// These never warn, but don't have an effect yet.
58
59// RUN: %clang_cl /c -### /Zc:rvalueCast -- %s 2>&1 | FileCheck -check-prefix=RVALUECAST-ON %s
60// RVALUECAST-ON-NOT: argument unused during compilation
61// RUN: %clang_cl /c -### /Zc:rvalueCast- -- %s 2>&1 | FileCheck -check-prefix=RVALUECAST-OFF %s
62// RVALUECAST-OFF: argument unused during compilation