]> granicus.if.org Git - clang/blob - test/Driver/clang_f_opts.c
Added f and m flags to be ignored. These will not display a warning. The revision
[clang] / test / Driver / clang_f_opts.c
1 // REQUIRES: clang-driver
2
3 // RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fsplit-stack %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
4 // RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-asm -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-enums -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
5
6 // CHECK-OPTIONS1: -split-stacks
7 // CHECK-OPTIONS1: -fgnu-keywords
8 // CHECK-OPTIONS1: -fblocks
9 // CHECK-OPTIONS1: -fpascal-strings
10
11 // CHECK-OPTIONS2: -fmath-errno
12 // CHECK-OPTIONS2: -fno-gnu-keywords
13 // CHECK-OPTIONS2: -fno-builtin
14 // CHECK-OPTIONS2: -fshort-enums
15 // CHECK-OPTIONS2: -fshort-wchar
16 // CHECK-OPTIONS2: -fno-common
17 // CHECK-OPTIONS2: -fno-show-source-location
18
19 // RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s
20 // WRITE-STRINGS1: -fconst-strings
21 // RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s
22 // WRITE-STRINGS2-NOT: -fconst-strings
23 // RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s
24 // WRITE-STRINGS3-NOT: -fconst-strings
25
26 // RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
27 // RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
28 // RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
29 // RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
30 // RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
31 // RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
32 // RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
33 // DEPRECATED-ON-CHECK: -fdeprecated-macro
34 // DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro
35
36 // RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
37 // RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
38 // RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s
39 // FP-CONTRACT-FAST-CHECK: -ffp-contract=fast
40 // FP-CONTRACT-OFF-CHECK: -ffp-contract=off
41
42 // RUN: %clang -### -S -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s
43 // RUN: %clang -### -S -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s
44 // RUN: %clang -### -S -fno-unroll-loops -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s
45 // RUN: %clang -### -S -funroll-loops -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s
46 // CHECK-UNROLL-LOOPS: "-funroll-loops"
47 // CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops"
48
49 // RUN: %clang -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
50 // RUN: %clang -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
51 // RUN: %clang -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
52 // RUN: %clang -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
53 // CHECK-REROLL-LOOPS: "-freroll-loops"
54 // CHECK-NO-REROLL-LOOPS-NOT: "-freroll-loops"
55
56 // RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
57 // CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
58
59 // RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
60 // CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
61
62 // RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
63 // RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
64 // RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
65 // RUN: %clang -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
66 // RUN: %clang -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
67 // RUN: %clang -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
68 // RUN: %clang -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
69 // RUN: %clang -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
70 // RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
71 // RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
72 // RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
73 // RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
74 // RUN: %clang -### -S -fno-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
75 // RUN: %clang -### -S -O1 -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
76 // RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
77 // RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
78 // RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
79 // RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
80 // RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
81 // CHECK-VECTORIZE: "-vectorize-loops"
82 // CHECK-NO-VECTORIZE-NOT: "-vectorize-loops"
83
84 // RUN: %clang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
85 // RUN: %clang -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
86 // RUN: %clang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
87 // RUN: %clang -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
88 // RUN: %clang -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
89 // RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
90 // RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
91 // RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
92 // RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
93 // RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
94 // RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
95 // RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
96 // RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
97 // RUN: %clang -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
98 // RUN: %clang -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
99 // RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
100 // RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
101 // RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
102 // RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
103 // CHECK-SLP-VECTORIZE: "-vectorize-slp"
104 // CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp"
105
106 // RUN: %clang -### -S -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s
107 // RUN: %clang -### -S -fno-slp-vectorize-aggressive -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s
108 // RUN: %clang -### -S -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s
109 // RUN: %clang -### -S -fslp-vectorize-aggressive -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s
110 // CHECK-SLP-VECTORIZE-AGG: "-vectorize-slp-aggressive"
111 // CHECK-NO-SLP-VECTORIZE-AGG-NOT: "-vectorize-slp-aggressive"
112
113 // RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s
114 // RUN: %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s
115 // CHECK-EXTENDED-IDENTIFIERS: "-cc1"
116 // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers"
117 // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers'
118
119 // RUN: %clang -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s
120 // CHECK-M-PASCAL-STRINGS: "-fpascal-strings"
121
122 // RUN: %clang -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s
123 // CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings"
124
125 // RUN: %clang -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O %s
126 // CHECK-MAX-O: warning: -O4 is equivalent to -O3
127 // CHECK-MAX-O: -O3
128
129 // RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s
130 // CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead
131
132 // RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s
133 // CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1'
134
135 // Test that we don't error on these.
136 // RUN: %clang -### -S -Werror                                                \
137 // RUN:     -falign-functions -falign-functions=2 -fno-align-functions        \
138 // RUN:     -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables      \
139 // RUN:     -fbuiltin -fno-builtin                                            \
140 // RUN:     -fdiagnostics-show-location=once                                  \
141 // RUN:     -ffloat-store -fno-float-store                                    \
142 // RUN:     -feliminate-unused-debug-types -fno-eliminate-unused-debug-types  \
143 // RUN:     -fgcse -fno-gcse                                                  \
144 // RUN:     -fident -fno-ident                                                \
145 // RUN:     -fimplicit-templates -fno-implicit-templates                      \
146 // RUN:     -finput-charset=UTF-8                                             \
147 // RUN:     -fivopts -fno-ivopts                                              \
148 // RUN:     -fnon-call-exceptions -fno-non-call-exceptions                    \
149 // RUN:     -fpermissive -fno-permissive                                      \
150 // RUN:     -fdefer-pop -fno-defer-pop                                        \
151 // RUN:     -fprefetch-loop-arrays -fno-prefetch-loop-arrays                  \
152 // RUN:     -fprofile-correction -fno-profile-correction                      \
153 // RUN:     -fprofile-dir=bar                                                 \
154 // RUN:     -fprofile-use -fprofile-use=zed -fno-profile-use                  \
155 // RUN:     -fprofile-values -fno-profile-values                              \
156 // RUN:     -frounding-math -fno-rounding-math                                \
157 // RUN:     -fsee -fno-see                                                    \
158 // RUN:     -ftracer -fno-tracer                                              \
159 // RUN:     -funroll-all-loops -fno-unroll-all-loops                          \
160 // RUN:     -fuse-ld=gold                                                     \
161 // RUN:     -fno-builtin-foobar                                               \
162 // RUN:     -fno-builtin-strcat -fno-builtin-strcpy                           \
163 // RUN:     -fno-var-tracking                                                 \
164 // RUN:     -fno-unsigned-char                                                \
165 // RUN:     -fno-signed-char                                                  \
166 // RUN:     -fstrength-reduce -fno-strength-reduce                            \
167 // RUN:     -finline-limit=1000                                               \
168 // RUN:     -finline-limit                                                    \
169 // RUN:     -flto=1                                                           \
170 // RUN:     -falign-labels                                                    \
171 // RUN:     -falign-labels=100                                                \
172 // RUN:     -falign-loops                                                     \
173 // RUN:     -falign-loops=100                                                 \
174 // RUN:     -falign-jumps                                                     \
175 // RUN:     -falign-jumps=100                                                 \
176 // RUN:     -fexcess-precision=100                                            \
177 // RUN:     -fbranch-count-reg                                                \ 
178 // RUN:     -fcaller-saves                                                    \
179 // RUN:     -fno-default-inline -fdefault-inline                              \
180 // RUN:     -fgcse-after-reload                                               \
181 // RUN:     -fgcse-las                                                        \
182 // RUN:     -fgcse-sm                                                         \
183 // RUN:     -fipa-cp                                                          \
184 // RUN:     -finline-functions-called-once                                    \
185 // RUN:     -fmodulo-sched                                                    \
186 // RUN:     -fmodulo-sched-allow-regmoves                                     \
187 // RUN:     -fpeel-loops                                                      \
188 // RUN:     -frename-registers                                                \
189 // RUN:     -fschedule-insns2                                                 \
190 // RUN:     -fsingle-precision-constant                                       \
191 // RUN:     -ftree_loop_im                                                    \
192 // RUN:     -ftree_loop_ivcanon                                               \
193 // RUN:     -ftree_loop_linear                                                \
194 // RUN:     -funsafe-loop-optimizations                                       \
195 // RUN:     -fuse-linker-plugin                                               \
196 // RUN:     -fvect-cost-model                                                 \
197 // RUN:     -fvariable-expansion-in-unroller                                  \
198 // RUN:     -fweb                                                             \
199 // RUN:     -fwhole-program                                                   \
200 // RUN:     -fno-tree-dce -ftree-dce                                          \
201 // RUN:     -fno-tree-ter -ftree-ter                                          \
202 // RUN:     -fno-tree-vrp -ftree-vrp                                          \
203 // RUN:     -fno-delete-null-pointer-checks -fdelete-null-pointer-checks      \
204 // RUN:     -fno-inline-small-functions -finline-small-functions              \
205 // RUN:     -fno-fat-lto-objects -ffat-lto-objects                            \
206 // RUN:     -fno-merge-constants -fmerge-constants                            \
207 // RUN:     -fno-caller-saves -fcaller-saves                                  \
208 // RUN:     -fno-reorder-blocks -freorder-blocks                              \
209 // RUN:     -fno-schedule-insns2 -fschedule-insns2                            \
210 // RUN:     -fno-stack-check                                                  \
211 // RUN:     -fno-check-new -fcheck-new                                        \
212 // RUN:     -ffriend-injection                                                \
213 // RUN:     -fno-implement-inlines -fimplement-inlines                        \
214 // RUN:     -fstack-check                                                     \
215 // RUN:     -fexec-charset=UTF-8                                              \
216 // RUN:     -fforce-addr                                                      \ 
217 // RUN:     -malign-functions=100                                             \
218 // RUN:     -malign-loops=100                                                 \
219 // RUN:     -malign-jumps=100                                                 \
220 // RUN:     %s 2>&1 | FileCheck --check-prefix=IGNORE %s
221 // IGNORE-NOT: error: unknown argument
222
223 // Test that the warning is displayed on these.
224 // RUN: %clang -###                                                           \
225 // RUN: -finline-limit=1000                                                   \
226 // RUN: -finline-limit                                                        \
227 // RUN: -fexpensive-optimizations                                             \
228 // RUN: -fno-expensive-optimizations                                          \
229 // RUN: -fno-defer-pop                                                        \
230 // RUN: -finline-functions                                                    \
231 // RUN: -fno-keep-inline-functions                                            \
232 // RUN: -freorder-blocks                                                      \
233 // RUN: -fprofile-dir=/rand/dir                                               \
234 // RUN: -fprofile-use                                                         \
235 // RUN: -fprofile-use=/rand/dir                                               \
236 // RUN: -falign-functions                                                     \
237 // RUN: -falign-functions=1                                                   \
238 // RUN: -ffloat-store                                                         \
239 // RUN: -fgcse                                                                \
240 // RUN: -fivopts                                                              \
241 // RUN: -fprefetch-loop-arrays                                                \
242 // RUN: -fprofile-correction                                                  \
243 // RUN: -fprofile-values                                                      \
244 // RUN: -frounding-math                                                       \
245 // RUN: -fschedule-insns                                                      \
246 // RUN: -fsignaling-nans                                                      \
247 // RUN: -fstrength-reduce                                                     \
248 // RUN: -ftracer                                                              \
249 // RUN: -funroll-all-loops                                                    \
250 // RUN: -funswitch-loops                                                      \
251 // RUN: -flto=1                                                               \
252 // RUN: -falign-labels                                                        \
253 // RUN: -falign-labels=100                                                    \
254 // RUN: -falign-loops                                                         \
255 // RUN: -falign-loops=100                                                     \
256 // RUN: -falign-jumps                                                         \
257 // RUN: -falign-jumps=100                                                     \
258 // RUN: -fexcess-precision=100                                                \
259 // RUN: -fbranch-count-reg                                                    \ 
260 // RUN: -fcaller-saves                                                        \
261 // RUN: -fno-default-inline                                                   \
262 // RUN: -fgcse-after-reload                                                   \
263 // RUN: -fgcse-las                                                            \
264 // RUN: -fgcse-sm                                                             \
265 // RUN: -fipa-cp                                                              \
266 // RUN: -finline-functions-called-once                                        \
267 // RUN: -fmodulo-sched                                                        \
268 // RUN: -fmodulo-sched-allow-regmoves                                         \
269 // RUN: -fpeel-loops                                                          \
270 // RUN: -frename-registers                                                    \
271 // RUN: -fschedule-insns2                                                     \
272 // RUN: -fsingle-precision-constant                                           \
273 // RUN: -ftree_loop_im                                                        \
274 // RUN: -ftree_loop_ivcanon                                                   \
275 // RUN: -ftree_loop_linear                                                    \
276 // RUN: -funsafe-loop-optimizations                                           \
277 // RUN: -fuse-linker-plugin                                                   \
278 // RUN: -fvect-cost-model                                                     \
279 // RUN: -fvariable-expansion-in-unroller                                      \
280 // RUN: -fweb                                                                 \
281 // RUN: -fwhole-program                                                       \
282 // RUN: -fcaller-saves                                                        \
283 // RUN: -freorder-blocks                                                      \
284 // RUN: -fdelete-null-pointer-checks                                          \
285 // RUN: -ffat-lto-objects                                                     \
286 // RUN: -fmerge-constants                                                     \
287 // RUN: -finline-small-functions                                              \
288 // RUN: -ftree-dce                                                            \
289 // RUN: -ftree-ter                                                            \
290 // RUN: -ftree-vrp                                                            \
291 // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s
292 // CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported
293 // CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported
294 // CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported
295 // CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported
296 // CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported
297 // CHECK-WARNING-DAG: optimization flag '-finline-functions' is not supported
298 // CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported
299 // CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported
300 // CHECK-WARNING-DAG: optimization flag '-fprofile-dir=/rand/dir' is not supported
301 // CHECK-WARNING-DAG: optimization flag '-fprofile-use' is not supported
302 // CHECK-WARNING-DAG: optimization flag '-fprofile-use=/rand/dir' is not supported
303 // CHECK-WARNING-DAG: optimization flag '-falign-functions' is not supported
304 // CHECK-WARNING-DAG: optimization flag '-falign-functions=1' is not supported
305 // CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported
306 // CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported
307 // CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported
308 // CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported
309 // CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported
310 // CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported
311 // CHECK-WARNING-DAG: optimization flag '-frounding-math' is not supported
312 // CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported
313 // CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported
314 // CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported
315 // CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported
316 // CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported
317 // CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported
318 // CHECK-WARNING-DAG: optimization flag '-flto=1' is not supported
319 // CHECK-WARNING-DAG: optimization flag '-falign-labels' is not supported
320 // CHECK-WARNING-DAG: optimization flag '-falign-labels=100' is not supported
321 // CHECK-WARNING-DAG: optimization flag '-falign-loops' is not supported
322 // CHECK-WARNING-DAG: optimization flag '-falign-loops=100' is not supported
323 // CHECK-WARNING-DAG: optimization flag '-falign-jumps' is not supported
324 // CHECK-WARNING-DAG: optimization flag '-falign-jumps=100' is not supported
325 // CHECK-WARNING-DAG: optimization flag '-fexcess-precision=100' is not supported
326 // CHECK-WARNING-DAG: optimization flag '-fbranch-count-reg' is not supported
327 // CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported
328 // CHECK-WARNING-DAG: optimization flag '-fno-default-inline' is not supported
329 // CHECK-WARNING-DAG: optimization flag '-fgcse-after-reload' is not supported
330 // CHECK-WARNING-DAG: optimization flag '-fgcse-las' is not supported
331 // CHECK-WARNING-DAG: optimization flag '-fgcse-sm' is not supported
332 // CHECK-WARNING-DAG: optimization flag '-fipa-cp' is not supported
333 // CHECK-WARNING-DAG: optimization flag '-finline-functions-called-once' is not supported
334 // CHECK-WARNING-DAG: optimization flag '-fmodulo-sched' is not supported
335 // CHECK-WARNING-DAG: optimization flag '-fmodulo-sched-allow-regmoves' is not supported
336 // CHECK-WARNING-DAG: optimization flag '-fpeel-loops' is not supported
337 // CHECK-WARNING-DAG: optimization flag '-frename-registers' is not supported
338 // CHECK-WARNING-DAG: optimization flag '-fschedule-insns2' is not supported
339 // CHECK-WARNING-DAG: optimization flag '-fsingle-precision-constant' is not supported
340 // CHECK-WARNING-DAG: optimization flag '-ftree_loop_im' is not supported
341 // CHECK-WARNING-DAG: optimization flag '-ftree_loop_ivcanon' is not supported
342 // CHECK-WARNING-DAG: optimization flag '-ftree_loop_linear' is not supported
343 // CHECK-WARNING-DAG: optimization flag '-funsafe-loop-optimizations' is not supported
344 // CHECK-WARNING-DAG: optimization flag '-fuse-linker-plugin' is not supported
345 // CHECK-WARNING-DAG: optimization flag '-fvect-cost-model' is not supported
346 // CHECK-WARNING-DAG: optimization flag '-fvariable-expansion-in-unroller' is not supported
347 // CHECK-WARNING-DAG: optimization flag '-fweb' is not supported
348 // CHECK-WARNING-DAG: optimization flag '-fwhole-program' is not supported
349 // CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported
350 // CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported
351 // CHECK-WARNING-DAG: optimization flag '-fdelete-null-pointer-checks' is not supported
352 // CHECK-WARNING-DAG: optimization flag '-ffat-lto-objects' is not supported
353 // CHECK-WARNING-DAG: optimization flag '-fmerge-constants' is not supported
354 // CHECK-WARNING-DAG: optimization flag '-finline-small-functions' is not supported
355 // CHECK-WARNING-DAG: optimization flag '-ftree-dce' is not supported
356 // CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported
357 // CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported
358
359 // Test that we mute the warning on these
360 // RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument              \
361 // RUN:     %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s
362 // RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument                   \
363 // RUN:     %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
364 // RUN: %clang -### -finline-limit \
365 // RUN:     -Winvalid-command-line-argument -Wno-ignored-optimization-argument          \
366 // RUN:     %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
367 // CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported
368 // CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported
369
370
371 // RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 %s
372 // RUN: %clang -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 %s
373 // CHECK-WCHAR1: -fno-short-wchar
374 // CHECK-WCHAR1-NOT: -fshort-wchar
375 // CHECK-WCHAR2: -fshort-wchar
376 // CHECK-WCHAR2-NOT: -fno-short-wchar