| 1 |
// UNSUPPORTED: target={{.*}}-aix{{.*}} |
| 2 |
// 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 |
| 3 |
// 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 -fprotect-parens %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s |
| 4 |
|
| 5 |
// CHECK-OPTIONS1: -fsplit-stack |
| 6 |
// CHECK-OPTIONS1: -fgnu-keywords |
| 7 |
// CHECK-OPTIONS1: -fblocks |
| 8 |
// CHECK-OPTIONS1: -fpascal-strings |
| 9 |
|
| 10 |
// CHECK-OPTIONS2: -fprotect-parens |
| 11 |
// CHECK-OPTIONS2: -fmath-errno |
| 12 |
// CHECK-OPTIONS2: -fno-gnu-keywords |
| 13 |
// CHECK-OPTIONS2: -fno-builtin |
| 14 |
// CHECK-OPTIONS2: -fshort-enums |
| 15 |
// CHECK-OPTIONS2-NOT: -fcommon |
| 16 |
// CHECK-OPTIONS2: -fno-show-source-location |
| 17 |
|
| 18 |
// RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s |
| 19 |
// WRITE-STRINGS1: -fconst-strings |
| 20 |
// RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s |
| 21 |
// WRITE-STRINGS2-NOT: -fconst-strings |
| 22 |
// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s |
| 23 |
// WRITE-STRINGS3-NOT: -fconst-strings |
| 24 |
|
| 25 |
// RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 26 |
// RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 27 |
// RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 28 |
// RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 29 |
// RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 30 |
// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 31 |
// RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 32 |
// DEPRECATED-ON-CHECK: -fdeprecated-macro |
| 33 |
// DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro |
| 34 |
|
| 35 |
// RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s |
| 36 |
// RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s |
| 37 |
// RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s |
| 38 |
// FP-CONTRACT-FAST-CHECK: -ffp-contract=fast |
| 39 |
// FP-CONTRACT-OFF-CHECK: -ffp-contract=off |
| 40 |
|
| 41 |
// RUN: %clang -### -S -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s |
| 42 |
// RUN: %clang -### -S -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s |
| 43 |
// RUN: %clang -### -S -fno-unroll-loops -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s |
| 44 |
// RUN: %clang -### -S -funroll-loops -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s |
| 45 |
// CHECK-UNROLL-LOOPS: "-funroll-loops" |
| 46 |
// CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops" |
| 47 |
|
| 48 |
// RUN: %clang -### -S -floop-interchange %s 2>&1 | FileCheck -check-prefix=CHECK-INTERCHANGE-LOOPS %s |
| 49 |
// RUN: %clang -### -S -fno-loop-interchange %s 2>&1 | FileCheck -check-prefix=CHECK-NO-INTERCHANGE-LOOPS %s |
| 50 |
// RUN: %clang -### -S -fno-loop-interchange -floop-interchange %s 2>&1 | FileCheck -check-prefix=CHECK-INTERCHANGE-LOOPS %s |
| 51 |
// RUN: %clang -### -S -floop-interchange -fno-loop-interchange %s 2>&1 | FileCheck -check-prefix=CHECK-NO-INTERCHANGE-LOOPS %s |
| 52 |
// CHECK-INTERCHANGE-LOOPS: "-floop-interchange" |
| 53 |
// CHECK-NO-INTERCHANGE-LOOPS: "-fno-loop-interchange" |
| 54 |
|
| 55 |
// RUN: %clang -### -S -fexperimental-loop-fusion %s -o /dev/null 2>&1 | FileCheck -check-prefix=CHECK-FUSE-LOOPS %s |
| 56 |
// CHECK-FUSE-LOOPS: "-fexperimental-loop-fusion" |
| 57 |
// |
| 58 |
// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s |
| 59 |
// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s |
| 60 |
|
| 61 |
// LOOP-FUSION-ON: loop-fusion |
| 62 |
// LOOP-FUSION-OFF-NOT: loop-fusion |
| 63 |
|
| 64 |
// RUN: %clang -### -S -fprofile-sample-accurate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-SAMPLE-ACCURATE %s |
| 65 |
// CHECK-PROFILE-SAMPLE-ACCURATE: "-fprofile-sample-accurate" |
| 66 |
|
| 67 |
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s |
| 68 |
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" |
| 69 |
|
| 70 |
// |
| 71 |
// RUN: %clang -### -x cuda -nocudainc -nocudalib \ |
| 72 |
// RUN: -c -fprofile-sample-use=%S/Inputs/file.prof --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ |
| 73 |
// RUN: | FileCheck -check-prefix=CHECK-CUDA-SAMPLE-PROFILE %s |
| 74 |
// -fprofile-sample-use should not be passed to the GPU compilation |
| 75 |
// CHECK-CUDA-SAMPLE-PROFILE: "-cc1" |
| 76 |
// CHECK-CUDA-SAMPLE-PROFILE-SAME: "-triple" "nvptx |
| 77 |
// CHECK-CUDA-SAMPLE-PROFILE-NOT: "-fprofile-sample-use={{.*}}/file.prof" |
| 78 |
// Host compilation should still have the option. |
| 79 |
// CHECK-CUDA-SAMPLE-PROFILE: "-cc1" |
| 80 |
// CHECK-CUDA-SAMPLE-PROFILE-SAME: "-fprofile-sample-use={{.*}}/file.prof" |
| 81 |
|
| 82 |
|
| 83 |
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s |
| 84 |
// CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" |
| 85 |
|
| 86 |
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s |
| 87 |
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s |
| 88 |
// CHECK-NO-AUTO-PROFILE-NOT: "-fprofile-sample-use={{.*}}/file.prof" |
| 89 |
|
| 90 |
// RUN: %clang -### -S -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-LLVM %s |
| 91 |
// RUN: %clang -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s |
| 92 |
// RUN: %clang -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s |
| 93 |
// RUN: %clang -### -S -fprofile-instr-generate=/tmp/somefile.profraw %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s |
| 94 |
// RUN: not %clang -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 95 |
// RUN: not %clang -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 96 |
// RUN: not %clang -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 97 |
// RUN: not %clang -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 98 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 99 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 100 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 101 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 102 |
// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 103 |
// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 104 |
// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 105 |
// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 106 |
// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 107 |
// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 108 |
// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 109 |
// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s |
| 110 |
// RUN: %clang -### -S -fprofile-instr-generate=file -fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s |
| 111 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s |
| 112 |
// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s |
| 113 |
// RUN: %clang -### -S -fprofile-generate=dir -fno-profile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s |
| 114 |
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s |
| 115 |
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s |
| 116 |
// RUN: %clang -### -S -fprofile-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s |
| 117 |
// RUN: %clang -### -S -fprofile-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s |
| 118 |
// RUN: not %clang -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s |
| 119 |
// RUN: %clang -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s |
| 120 |
// RUN: %clang -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s |
| 121 |
// RUN: %clang -### -S -fprofile-remapping-file=foo/bar.txt %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-REMAP %s |
| 122 |
// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" |
| 123 |
// CHECK-PROFILE-GENERATE-LLVM: "-fprofile-instrument=llvm" |
| 124 |
// CHECK-PROFILE-GENERATE-DIR: "-fprofile-instrument-path=/some/dir{{/|\\\\}}{{.*}}" |
| 125 |
// CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw" |
| 126 |
// CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' |
| 127 |
// CHECK-NO-MIX-GENERATE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' |
| 128 |
// CHECK-DISABLE-GEN-NOT: "-fprofile-instrument=clang" |
| 129 |
// CHECK-DISABLE-USE-NOT: "-fprofile-instr-use" |
| 130 |
// CHECK-COVERAGE-AND-GEN: '-fcoverage-mapping' only allowed with '-fprofile-instr-generate' |
| 131 |
// CHECK-DISABLE-COVERAGE-NOT: "-fcoverage-mapping" |
| 132 |
// CHECK-PROFILE-REMAP: "-fprofile-remapping-file=foo/bar.txt" |
| 133 |
|
| 134 |
// RUN: rm -rf %t && mkdir %t |
| 135 |
// RUN: llvm-profdata merge -o %t/somefile.prof %S/Inputs/a.proftext |
| 136 |
// RUN: llvm-profdata merge -o %t/default.profdata %S/Inputs/a.proftext |
| 137 |
// RUN: cd %t |
| 138 |
|
| 139 |
// RUN: %clang -### -S -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s |
| 140 |
// RUN: %clang -### -S -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s |
| 141 |
// RUN: mkdir -p %t/some/dir |
| 142 |
// RUN: cp %t/default.profdata %t/some/dir |
| 143 |
// RUN: %clang -### -S -fprofile-use=%t/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-DIR %s |
| 144 |
// RUN: %clang -### -S -fprofile-instr-use=%t/somefile.prof %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s |
| 145 |
// CHECK-PROFILE-USE: "-fprofile-instrument-use-path=default.profdata" |
| 146 |
// CHECK-PROFILE-USE-DIR: "-fprofile-instrument-use-path={{.*}}some/dir{{/|\\\\}}default.profdata" |
| 147 |
// CHECK-PROFILE-USE-FILE: "-fprofile-instrument-use-path={{.*}}somefile.prof" |
| 148 |
|
| 149 |
// RUN: %clang -### -S -fprofile-instr-use=%t/somefile.prof -fdiagnostics-misexpect-tolerance=10 -Wmisexpect %s 2>&1 | FileCheck %s --check-prefix=CHECK-MISEXPECT-TOLLERANCE |
| 150 |
// CHECK-MISEXPECT-TOLLERANCE: "-fdiagnostics-misexpect-tolerance=10" |
| 151 |
// CHECK-MISEXPECT-TOLLERANCE-NOT: argument unused |
| 152 |
|
| 153 |
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 154 |
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 155 |
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 156 |
// RUN: %clang -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 157 |
// RUN: %clang -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 158 |
// RUN: %clang -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 159 |
// RUN: %clang -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 160 |
// RUN: %clang -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 161 |
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 162 |
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 163 |
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 164 |
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 165 |
// RUN: %clang -### -S -fno-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 166 |
// RUN: %clang -### -S -O1 -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 167 |
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 168 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 169 |
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 170 |
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 171 |
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 172 |
// CHECK-VECTORIZE: "-vectorize-loops" |
| 173 |
// CHECK-NO-VECTORIZE-NOT: "-vectorize-loops" |
| 174 |
|
| 175 |
// RUN: %clang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 176 |
// RUN: %clang -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 177 |
// RUN: %clang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 178 |
// RUN: %clang -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 179 |
// RUN: %clang -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 180 |
// RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 181 |
// RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 182 |
// RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 183 |
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 184 |
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 185 |
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 186 |
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 187 |
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 188 |
// RUN: %clang -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 189 |
// RUN: %clang -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 190 |
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 191 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 192 |
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 193 |
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 194 |
// CHECK-SLP-VECTORIZE: "-vectorize-slp" |
| 195 |
// CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp" |
| 196 |
|
| 197 |
// RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s |
| 198 |
// RUN: not %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s |
| 199 |
// CHECK-EXTENDED-IDENTIFIERS: "-cc1" |
| 200 |
// CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" |
| 201 |
// CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers' |
| 202 |
|
| 203 |
// RUN: %clang -### -S -frounding-math %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH %s |
| 204 |
// CHECK-ROUNDING-MATH: "-cc1" |
| 205 |
// CHECK-ROUNDING-MATH: "-frounding-math" |
| 206 |
// CHECK-ROUNDING-MATH-NOT: "-fno-rounding-math" |
| 207 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH-NOT %s |
| 208 |
// RUN: not %clang -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s |
| 209 |
// CHECK-FPMODEL: unsupported argument 'imprecise' to option '-ffp-model=' |
| 210 |
// RUN: %clang -### -S -ffp-model=precise %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 211 |
// RUN: %clang -### -S -ffp-model=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 212 |
// RUN: %clang -### -S -ffp-model=fast %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 213 |
// RUN: not %clang -### -S -ffp-exception-behavior=trap %s 2>&1 | FileCheck -check-prefix=CHECK-FPEB %s |
| 214 |
// CHECK-FPEB: unsupported argument 'trap' to option '-ffp-exception-behavior=' |
| 215 |
// RUN: %clang -### -S -ffp-exception-behavior=maytrap %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 216 |
// RUN: %clang -### -S -ffp-exception-behavior=ignore %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 217 |
// RUN: %clang -### -S -ffp-exception-behavior=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s |
| 218 |
|
| 219 |
// RUN: %clang -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s |
| 220 |
// CHECK-M-PASCAL-STRINGS: "-fpascal-strings" |
| 221 |
|
| 222 |
// RUN: %clang -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s |
| 223 |
// CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings" |
| 224 |
|
| 225 |
// RUN: %clang -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O %s |
| 226 |
// CHECK-MAX-O: warning: -O4 is equivalent to -O3 |
| 227 |
// CHECK-MAX-O: -O3 |
| 228 |
|
| 229 |
// RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s |
| 230 |
// CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead |
| 231 |
|
| 232 |
// RUN: not %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s |
| 233 |
// CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1' |
| 234 |
|
| 235 |
// RUN: not %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-EXEC-CHARSET %s |
| 236 |
// CHECK-INVALID-EXEC-CHARSET: error: invalid value 'iso-8859-1' in '-fexec-charset=iso-8859-1' |
| 237 |
|
| 238 |
// Test that we don't error on these. |
| 239 |
// RUN: not %clang -### -S -Werror \ |
| 240 |
// RUN: -falign-functions -falign-functions=2 -fno-align-functions \ |
| 241 |
// RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables \ |
| 242 |
// RUN: -fbuiltin -fno-builtin \ |
| 243 |
// RUN: -fdiagnostics-show-location=once \ |
| 244 |
// RUN: -ffloat-store -fno-float-store \ |
| 245 |
// RUN: -feliminate-unused-debug-types -fno-eliminate-unused-debug-types \ |
| 246 |
// RUN: -fgcse -fno-gcse \ |
| 247 |
// RUN: -fident -fno-ident \ |
| 248 |
// RUN: -fimplicit-templates -fno-implicit-templates \ |
| 249 |
// RUN: -finput-charset=UTF-8 \ |
| 250 |
// RUN: -fexec-charset=UTF-8 \ |
| 251 |
// RUN: -fivopts -fno-ivopts \ |
| 252 |
// RUN: -fnon-call-exceptions -fno-non-call-exceptions \ |
| 253 |
// RUN: -fpermissive -fno-permissive \ |
| 254 |
// RUN: -fdefer-pop -fno-defer-pop \ |
| 255 |
// RUN: -fprefetch-loop-arrays -fno-prefetch-loop-arrays \ |
| 256 |
// RUN: -fprofile-correction -fno-profile-correction \ |
| 257 |
// RUN: -fprofile-values -fno-profile-values \ |
| 258 |
// RUN: -frounding-math -fno-rounding-math \ |
| 259 |
// RUN: -fsee -fno-see \ |
| 260 |
// RUN: -ftracer -fno-tracer \ |
| 261 |
// RUN: -funroll-all-loops -fno-unroll-all-loops \ |
| 262 |
// RUN: -fuse-ld=gold \ |
| 263 |
// RUN: -fno-builtin-foobar \ |
| 264 |
// RUN: -fno-builtin-strcat -fno-builtin-strcpy \ |
| 265 |
// RUN: -fno-var-tracking \ |
| 266 |
// RUN: -fno-unsigned-char \ |
| 267 |
// RUN: -fno-signed-char \ |
| 268 |
// RUN: -fstrength-reduce -fno-strength-reduce \ |
| 269 |
// RUN: -finline-limit=1000 \ |
| 270 |
// RUN: -finline-limit \ |
| 271 |
// RUN: -flto=1 \ |
| 272 |
// RUN: -falign-labels \ |
| 273 |
// RUN: -falign-labels=100 \ |
| 274 |
// RUN: -falign-loops \ |
| 275 |
// RUN: -falign-loops=100 \ |
| 276 |
// RUN: -falign-jumps \ |
| 277 |
// RUN: -falign-jumps=100 \ |
| 278 |
// RUN: -fexcess-precision=100 \ |
| 279 |
// RUN: -fbranch-count-reg \ |
| 280 |
// RUN: -fcaller-saves \ |
| 281 |
// RUN: -fno-default-inline -fdefault-inline \ |
| 282 |
// RUN: -fgcse-after-reload \ |
| 283 |
// RUN: -fgcse-las \ |
| 284 |
// RUN: -fgcse-sm \ |
| 285 |
// RUN: -fipa-cp \ |
| 286 |
// RUN: -finline-functions-called-once \ |
| 287 |
// RUN: -fmodulo-sched \ |
| 288 |
// RUN: -fmodulo-sched-allow-regmoves \ |
| 289 |
// RUN: -fpeel-loops \ |
| 290 |
// RUN: -frename-registers \ |
| 291 |
// RUN: -fschedule-insns2 \ |
| 292 |
// RUN: -fsingle-precision-constant \ |
| 293 |
// RUN: -funsafe-loop-optimizations \ |
| 294 |
// RUN: -fuse-linker-plugin \ |
| 295 |
// RUN: -fvect-cost-model \ |
| 296 |
// RUN: -fvariable-expansion-in-unroller \ |
| 297 |
// RUN: -fweb \ |
| 298 |
// RUN: -fwhole-program \ |
| 299 |
// RUN: -fno-tree-dce -ftree-dce \ |
| 300 |
// RUN: -fno-tree-ter -ftree-ter \ |
| 301 |
// RUN: -fno-tree-vrp -ftree-vrp \ |
| 302 |
// RUN: -fno-delete-null-pointer-checks -fdelete-null-pointer-checks \ |
| 303 |
// RUN: -fno-inline-small-functions -finline-small-functions \ |
| 304 |
// RUN: -fno-fat-lto-objects -ffat-lto-objects \ |
| 305 |
// RUN: -flto=auto -flto=jobserver \ |
| 306 |
// RUN: -fno-merge-constants -fmerge-constants \ |
| 307 |
// RUN: -fno-caller-saves -fcaller-saves \ |
| 308 |
// RUN: -fno-reorder-blocks -freorder-blocks \ |
| 309 |
// RUN: -fno-schedule-insns2 -fschedule-insns2 \ |
| 310 |
// RUN: -fno-stack-check \ |
| 311 |
// RUN: -ffriend-injection \ |
| 312 |
// RUN: -fno-implement-inlines -fimplement-inlines \ |
| 313 |
// RUN: -fstack-check \ |
| 314 |
// RUN: -fforce-addr \ |
| 315 |
// RUN: -malign-functions=100 \ |
| 316 |
// RUN: -malign-loops=100 \ |
| 317 |
// RUN: -malign-jumps=100 \ |
| 318 |
// RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s |
| 319 |
// IGNORE-NOT: error: unknown argument |
| 320 |
|
| 321 |
// Test that the warning is displayed on these. |
| 322 |
// RUN: not %clang -### \ |
| 323 |
// RUN: -finline-limit=1000 \ |
| 324 |
// RUN: -finline-limit \ |
| 325 |
// RUN: -fexpensive-optimizations \ |
| 326 |
// RUN: -fno-expensive-optimizations \ |
| 327 |
// RUN: -fno-defer-pop \ |
| 328 |
// RUN: -fkeep-inline-functions \ |
| 329 |
// RUN: -fno-keep-inline-functions \ |
| 330 |
// RUN: -freorder-blocks \ |
| 331 |
// RUN: -ffloat-store \ |
| 332 |
// RUN: -fgcse \ |
| 333 |
// RUN: -fivopts \ |
| 334 |
// RUN: -fprefetch-loop-arrays \ |
| 335 |
// RUN: -fprofile-correction \ |
| 336 |
// RUN: -fprofile-values \ |
| 337 |
// RUN: -fschedule-insns \ |
| 338 |
// RUN: -fsignaling-nans \ |
| 339 |
// RUN: -fstrength-reduce \ |
| 340 |
// RUN: -ftracer \ |
| 341 |
// RUN: -funroll-all-loops \ |
| 342 |
// RUN: -funswitch-loops \ |
| 343 |
// RUN: -flto=1 \ |
| 344 |
// RUN: -falign-labels \ |
| 345 |
// RUN: -falign-labels=100 \ |
| 346 |
// RUN: -falign-loops \ |
| 347 |
// RUN: -falign-loops=100 \ |
| 348 |
// RUN: -falign-jumps \ |
| 349 |
// RUN: -falign-jumps=100 \ |
| 350 |
// RUN: -fexcess-precision=100 \ |
| 351 |
// RUN: -fbranch-count-reg \ |
| 352 |
// RUN: -fcaller-saves \ |
| 353 |
// RUN: -fno-default-inline \ |
| 354 |
// RUN: -fgcse-after-reload \ |
| 355 |
// RUN: -fgcse-las \ |
| 356 |
// RUN: -fgcse-sm \ |
| 357 |
// RUN: -fipa-cp \ |
| 358 |
// RUN: -finline-functions-called-once \ |
| 359 |
// RUN: -fmodulo-sched \ |
| 360 |
// RUN: -fmodulo-sched-allow-regmoves \ |
| 361 |
// RUN: -fpeel-loops \ |
| 362 |
// RUN: -frename-registers \ |
| 363 |
// RUN: -fschedule-insns2 \ |
| 364 |
// RUN: -fsingle-precision-constant \ |
| 365 |
// RUN: -funsafe-loop-optimizations \ |
| 366 |
// RUN: -fuse-linker-plugin \ |
| 367 |
// RUN: -fvect-cost-model \ |
| 368 |
// RUN: -fvariable-expansion-in-unroller \ |
| 369 |
// RUN: -fweb \ |
| 370 |
// RUN: -fwhole-program \ |
| 371 |
// RUN: -fcaller-saves \ |
| 372 |
// RUN: -freorder-blocks \ |
| 373 |
// RUN: -ffat-lto-objects \ |
| 374 |
// RUN: -fmerge-constants \ |
| 375 |
// RUN: -finline-small-functions \ |
| 376 |
// RUN: -ftree-dce \ |
| 377 |
// RUN: -ftree-ter \ |
| 378 |
// RUN: -ftree-vrp \ |
| 379 |
// RUN: -fno-devirtualize \ |
| 380 |
// RUN: -fslp-vectorize-aggressive \ |
| 381 |
// RUN: -fno-slp-vectorize-aggressive \ |
| 382 |
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s |
| 383 |
// CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported |
| 384 |
// CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported |
| 385 |
// CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported |
| 386 |
// CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported |
| 387 |
// CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported |
| 388 |
// CHECK-WARNING-DAG: optimization flag '-fkeep-inline-functions' is not supported |
| 389 |
// CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported |
| 390 |
// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported |
| 391 |
// CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported |
| 392 |
// CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported |
| 393 |
// CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported |
| 394 |
// CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported |
| 395 |
// CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported |
| 396 |
// CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported |
| 397 |
// CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported |
| 398 |
// CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported |
| 399 |
// CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported |
| 400 |
// CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported |
| 401 |
// CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported |
| 402 |
// CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported |
| 403 |
// CHECK-WARNING-DAG: unsupported argument '1' to option '-flto=' |
| 404 |
// CHECK-WARNING-DAG: optimization flag '-falign-labels' is not supported |
| 405 |
// CHECK-WARNING-DAG: optimization flag '-falign-labels=100' is not supported |
| 406 |
// CHECK-WARNING-DAG: optimization flag '-falign-loops' is not supported |
| 407 |
// CHECK-WARNING-DAG: optimization flag '-falign-jumps' is not supported |
| 408 |
// CHECK-WARNING-DAG: optimization flag '-falign-jumps=100' is not supported |
| 409 |
// CHECK-WARNING-DAG: unsupported argument '100' to option '-fexcess-precision=' |
| 410 |
// CHECK-WARNING-DAG: optimization flag '-fbranch-count-reg' is not supported |
| 411 |
// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported |
| 412 |
// CHECK-WARNING-DAG: optimization flag '-fno-default-inline' is not supported |
| 413 |
// CHECK-WARNING-DAG: optimization flag '-fgcse-after-reload' is not supported |
| 414 |
// CHECK-WARNING-DAG: optimization flag '-fgcse-las' is not supported |
| 415 |
// CHECK-WARNING-DAG: optimization flag '-fgcse-sm' is not supported |
| 416 |
// CHECK-WARNING-DAG: optimization flag '-fipa-cp' is not supported |
| 417 |
// CHECK-WARNING-DAG: optimization flag '-finline-functions-called-once' is not supported |
| 418 |
// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched' is not supported |
| 419 |
// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched-allow-regmoves' is not supported |
| 420 |
// CHECK-WARNING-DAG: optimization flag '-fpeel-loops' is not supported |
| 421 |
// CHECK-WARNING-DAG: optimization flag '-frename-registers' is not supported |
| 422 |
// CHECK-WARNING-DAG: optimization flag '-fschedule-insns2' is not supported |
| 423 |
// CHECK-WARNING-DAG: optimization flag '-fsingle-precision-constant' is not supported |
| 424 |
// CHECK-WARNING-DAG: optimization flag '-funsafe-loop-optimizations' is not supported |
| 425 |
// CHECK-WARNING-DAG: optimization flag '-fuse-linker-plugin' is not supported |
| 426 |
// CHECK-WARNING-DAG: optimization flag '-fvect-cost-model' is not supported |
| 427 |
// CHECK-WARNING-DAG: optimization flag '-fvariable-expansion-in-unroller' is not supported |
| 428 |
// CHECK-WARNING-DAG: optimization flag '-fweb' is not supported |
| 429 |
// CHECK-WARNING-DAG: optimization flag '-fwhole-program' is not supported |
| 430 |
// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported |
| 431 |
// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported |
| 432 |
// CHECK-WARNING-DAG: optimization flag '-fmerge-constants' is not supported |
| 433 |
// CHECK-WARNING-DAG: optimization flag '-finline-small-functions' is not supported |
| 434 |
// CHECK-WARNING-DAG: optimization flag '-ftree-dce' is not supported |
| 435 |
// CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported |
| 436 |
// CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported |
| 437 |
// CHECK-WARNING-DAG: optimization flag '-fno-devirtualize' is not supported |
| 438 |
// CHECK-WARNING-DAG: the flag '-fslp-vectorize-aggressive' has been deprecated and will be ignored |
| 439 |
// CHECK-WARNING-DAG: the flag '-fno-slp-vectorize-aggressive' has been deprecated and will be ignored |
| 440 |
|
| 441 |
// Test that we mute the warning on these |
| 442 |
// RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \ |
| 443 |
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s |
| 444 |
// RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument \ |
| 445 |
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s |
| 446 |
// RUN: %clang -### -finline-limit \ |
| 447 |
// RUN: -Winvalid-command-line-argument -Wno-ignored-optimization-argument \ |
| 448 |
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s |
| 449 |
// CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported |
| 450 |
// CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported |
| 451 |
|
| 452 |
// Test that an ignored optimization argument only prints 1 warning, |
| 453 |
// not both a warning about not claiming the arg, *and* about not supporting |
| 454 |
// the arg; and that adding -Wno-ignored-optimization silences the warning. |
| 455 |
// |
| 456 |
// RUN: %clang -### -fprofile-correction %s 2>&1 \ |
| 457 |
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING3 %s |
| 458 |
// CHECK-NO-WARNING3: optimization flag '-fprofile-correction' is not supported |
| 459 |
// CHECK-NO-WARNING3-NOT: argument unused |
| 460 |
// RUN: %clang -### -fprofile-correction -Wno-ignored-optimization-argument %s 2>&1 \ |
| 461 |
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING4 %s |
| 462 |
// CHECK-NO-WARNING4-NOT: not supported |
| 463 |
// CHECK-NO-WARNING4-NOT: argument unused |
| 464 |
|
| 465 |
// RUN: %clang -### -S -fsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN1 %s |
| 466 |
// CHAR-SIGN1-NOT: -fno-signed-char |
| 467 |
|
| 468 |
// RUN: %clang -### -S -funsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN2 %s |
| 469 |
// CHAR-SIGN2: -fno-signed-char |
| 470 |
|
| 471 |
// RUN: %clang -### -S -fno-signed-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN3 %s |
| 472 |
// CHAR-SIGN3: -fno-signed-char |
| 473 |
|
| 474 |
// RUN: %clang -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s |
| 475 |
// CHAR-SIGN4-NOT: -fno-signed-char |
| 476 |
|
| 477 |
// RUN: %clang --target=x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s |
| 478 |
// RUN: %clang --target=x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s |
| 479 |
// Make sure we don't match the -NOT lines with the linker invocation. |
| 480 |
// Delimiters match the start of the cc1 and the start of the linker lines |
| 481 |
// DELIMITERS: {{^ (\(in-process\)|")}} |
| 482 |
// CHECK-WCHAR1: -fwchar-type=int |
| 483 |
// CHECK-WCHAR1-NOT: -fwchar-type=short |
| 484 |
// CHECK-WCHAR2: -fwchar-type=short |
| 485 |
// CHECK-WCHAR2-NOT: -fwchar-type=int |
| 486 |
// DELIMITERS: {{^ *"}} |
| 487 |
|
| 488 |
// RUN: %clang -### -S -fstrict-return %s 2>&1 | FileCheck -check-prefix=CHECK-STRICT-RETURN %s |
| 489 |
// RUN: %clang -### -S -fno-strict-return %s 2>&1 | FileCheck -check-prefix=CHECK-NO-STRICT-RETURN %s |
| 490 |
// CHECK-STRICT-RETURN-NOT: "-fno-strict-return" |
| 491 |
// CHECK-NO-STRICT-RETURN: "-fno-strict-return" |
| 492 |
|
| 493 |
// RUN: %clang -### -S -fno-debug-info-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DEBUG %s |
| 494 |
// RUN: %clang -### -S -fdebug-info-for-profiling -fno-debug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-DEBUG %s |
| 495 |
// CHECK-PROFILE-DEBUG: -fdebug-info-for-profiling |
| 496 |
// CHECK-NO-PROFILE-DEBUG-NOT: -fdebug-info-for-profiling |
| 497 |
|
| 498 |
// RUN: %clang -### -S -fallow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-ALLOW-PLACEHOLDERS %s |
| 499 |
// RUN: %clang -### -S -fno-allow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ALLOW-PLACEHOLDERS %s |
| 500 |
// CHECK-ALLOW-PLACEHOLDERS: -fallow-editor-placeholders |
| 501 |
// CHECK-NO-ALLOW-PLACEHOLDERS-NOT: -fallow-editor-placeholders |
| 502 |
|
| 503 |
// RUN: %clang -### --target=x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s |
| 504 |
// CHECK-WINDOWS-ISO10646: "-fwchar-type=int" |
| 505 |
// CHECK-WINDOWS-ISO10646: "-fsigned-wchar" |
| 506 |
|
| 507 |
// RUN: %clang -### -S -fcf-protection %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s |
| 508 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s |
| 509 |
// RUN: %clang -### -S -fcf-protection=full %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s |
| 510 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s |
| 511 |
// CHECK-CF-PROTECTION-FULL: -fcf-protection=full |
| 512 |
// CHECK-NO-CF-PROTECTION-FULL-NOT: -fcf-protection=full |
| 513 |
// RUN: %clang -### -S -fcf-protection=return %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-RETURN %s |
| 514 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-RETURN %s |
| 515 |
// CHECK-CF-PROTECTION-RETURN: -fcf-protection=return |
| 516 |
// CHECK-NO-CF-PROTECTION-RETURN-NOT: -fcf-protection=return |
| 517 |
// RUN: %clang -### -S -fcf-protection=branch %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-BRANCH %s |
| 518 |
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-BRANCH %s |
| 519 |
// CHECK-CF-PROTECTION-BRANCH: -fcf-protection=branch |
| 520 |
// CHECK-NO-CF-PROTECTION-BRANCH-NOT: -fcf-protection=branch |
| 521 |
|
| 522 |
// RUN: %clang -### -S -fprofile-instr-generate -fcoverage-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-COMPILATION-DIR %s |
| 523 |
// RUN: %clang -### -S -fprofile-instr-generate -ffile-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-COMPILATION-DIR %s |
| 524 |
// CHECK-COVERAGE-COMPILATION-DIR: "-fcoverage-compilation-dir=." |
| 525 |
// CHECK-COVERAGE-COMPILATION-DIR-NOT: "-ffile-compilation-dir=." |
| 526 |
|
| 527 |
// RUN: %clang -### -S -fverify-intermediate-code %s 2>&1 | FileCheck -check-prefix=CHECK-VERIFY-INTERMEDIATE-CODE %s |
| 528 |
// RUN: %clang -### -S -fno-verify-intermediate-code %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VERIFY-INTERMEDIATE-CODE %s |
| 529 |
// CHECK-VERIFY-INTERMEDIATE-CODE-NOT: "-disable-llvm-verifier" |
| 530 |
// CHECK-NO-VERIFY-INTERMEDIATE-CODE: "-disable-llvm-verifier" |
| 531 |
|
| 532 |
// RUN: %clang -### -S -fdiscard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-DISCARD-NAMES %s |
| 533 |
// RUN: %clang -### -S -fno-discard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-NO-DISCARD-NAMES %s |
| 534 |
// CHECK-DISCARD-NAMES: "-discard-value-names" |
| 535 |
// CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names" |
| 536 |
|
| 537 |
// RUN: %clang -### -S -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s |
| 538 |
// RUN: %clang -### -S -fno-delete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NO-NULL-POINTER-CHECKS %s |
| 539 |
// RUN: %clang -### -S -fdelete-null-pointer-checks -fno-delete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NO-NULL-POINTER-CHECKS %s |
| 540 |
// RUN: %clang -### -S -fno-delete-null-pointer-checks -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s |
| 541 |
// CHECK-NO-NULL-POINTER-CHECKS: "-fno-delete-null-pointer-checks" |
| 542 |
// CHECK-NULL-POINTER-CHECKS-NOT: "-fno-delete-null-pointer-checks" |
| 543 |
|
| 544 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s |
| 545 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s |
| 546 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s |
| 547 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s |
| 548 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s |
| 549 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s |
| 550 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s |
| 551 |
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s |
| 552 |
// Test with a couple examples of non-ELF object file formats |
| 553 |
// RUN: %clang -### -S --target=x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s |
| 554 |
// RUN: not %clang -### -S --target=x86_64-unknown-windows -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s |
| 555 |
// CHECK-RECORD-GCC-SWITCHES: "-record-command-line" |
| 556 |
// CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line" |
| 557 |
// CHECK-RECORD-GCC-SWITCHES-ERROR: error: unsupported option '-frecord-command-line' for target |
| 558 |
|
| 559 |
// RUN: %clang -### -S -ftrivial-auto-var-init=uninitialized %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-UNINIT %s |
| 560 |
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN %s |
| 561 |
// RUN: %clang -### -S -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO %s |
| 562 |
// CHECK-TRIVIAL-UNINIT-NOT: hasn't been enabled |
| 563 |
// CHECK-TRIVIAL-PATTERN-NOT: hasn't been enabled |
| 564 |
// CHECK-TRIVIAL-ZERO-NOT: hasn't been enabled |
| 565 |
|
| 566 |
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER %s |
| 567 |
// RUN: %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER %s |
| 568 |
// RUN: not %clang -### -S -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY %s |
| 569 |
// RUN: not %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE %s |
| 570 |
// RUN: not %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE %s |
| 571 |
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: is used without '-ftrivial-auto-var-init' |
| 572 |
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: only accepts positive integers |
| 573 |
// CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: is used without '-ftrivial-auto-var-init' |
| 574 |
// CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: only accepts positive integers |
| 575 |
// CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY: used without '-ftrivial-auto-var-init=zero' or |
| 576 |
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE: only accepts positive integers |
| 577 |
// CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE: only accepts positive integers |
| 578 |
|
| 579 |
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-max-size=1024 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-MAX-SIZE %s |
| 580 |
// RUN: %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-max-size=1024 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-MAX-SIZE %s |
| 581 |
// RUN: not %clang -### -S -ftrivial-auto-var-init-max-size=1024 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-MAX-SIZE-MISSING-DEPENDENCY %s |
| 582 |
// RUN: not %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-max-size=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-MAX-SIZE-INVALID-VALUE %s |
| 583 |
// RUN: not %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-max-size=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-MAX-SIZE-INVALID-VALUE %s |
| 584 |
// CHECK-TRIVIAL-PATTERN-MAX-SIZE-NOT: is used without '-ftrivial-auto-var-init' |
| 585 |
// CHECK-TRIVIAL-PATTERN-MAX-SIZE-NOT: only accepts positive integers (in bytes) |
| 586 |
// CHECK-TRIVIAL-ZERO-MAX-SIZE-NOT: is used without '-ftrivial-auto-var-init' |
| 587 |
// CHECK-TRIVIAL-ZERO-MAX-SIZE-NOT: only accepts positive integers (in bytes) |
| 588 |
// CHECK-TRIVIAL-MAX-SIZE-MISSING-DEPENDENCY: used without '-ftrivial-auto-var-init=zero' or |
| 589 |
// CHECK-TRIVIAL-PATTERN-MAX-SIZE-INVALID-VALUE: only accepts positive integers (in bytes) |
| 590 |
// CHECK-TRIVIAL-ZERO-MAX-SIZE-INVALID-VALUE: only accepts positive integers (in bytes) |
| 591 |
|
| 592 |
// RUN: %clang -### -S -fno-temp-file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-TEMP-FILE %s |
| 593 |
// CHECK-NO-TEMP-FILE: "-fno-temp-file" |
| 594 |
|
| 595 |
// RUN: %clang -### -xobjective-c -fobjc-disable-direct-methods-for-testing %s 2>&1 | FileCheck -check-prefix=CHECK_DISABLE_DIRECT %s |
| 596 |
// RUN: %clang -### -xobjective-c %s 2>&1 | FileCheck -check-prefix=CHECK_NO_DISABLE_DIRECT %s |
| 597 |
// CHECK_DISABLE_DIRECT: -fobjc-disable-direct-methods-for-testing |
| 598 |
// CHECK_NO_DISABLE_DIRECT-NOT: -fobjc-disable-direct-methods-for-testing |
| 599 |
|
| 600 |
// RUN: %clang -### --target=arm64-apple-macos10 -xobjective-c -fobjc-direct-precondition-thunk %s 2>&1 | FileCheck -check-prefix=CHECK_DIRECT_PRECONDITION_THUNK %s |
| 601 |
// RUN: %clang -### --target=arm64-apple-macos10 -xobjective-c -fno-objc-direct-precondition-thunk %s 2>&1 | FileCheck -check-prefix=CHECK_NO_DIRECT_PRECONDITION_THUNK %s |
| 602 |
// RUN: %clang -### --target=arm64-apple-macos10 -xobjective-c -fobjc-direct-precondition-thunk -fno-objc-direct-precondition-thunk %s 2>&1 | FileCheck -check-prefix=CHECK_NO_DIRECT_PRECONDITION_THUNK %s |
| 603 |
// RUN: %clang -### --target=arm64-apple-macos10 -xobjective-c -fno-objc-direct-precondition-thunk -fobjc-direct-precondition-thunk %s 2>&1 | FileCheck -check-prefix=CHECK_DIRECT_PRECONDITION_THUNK %s |
| 604 |
// RUN: %clang -### --target=arm64-apple-macos10 -xobjective-c %s 2>&1 | FileCheck -check-prefix=CHECK_NO_DIRECT_PRECONDITION_THUNK %s |
| 605 |
// CHECK_DIRECT_PRECONDITION_THUNK: "-fobjc-direct-precondition-thunk" |
| 606 |
// CHECK_NO_DIRECT_PRECONDITION_THUNK-NOT: -fobjc-direct-precondition-thunk |
| 607 |
|
| 608 |
// Test that -fobjc-direct-precondition-thunk emits a warning when used with GNU runtime |
| 609 |
// and that the flag is not passed to cc1. |
| 610 |
// RUN: %clang --target=x86_64-linux-gnu -fobjc-runtime=gnustep-2.0 -fobjc-direct-precondition-thunk -### -c -xobjective-c %s 2>&1 | FileCheck -check-prefix=CHECK_GNUSTEP_WARN %s |
| 611 |
// CHECK_GNUSTEP_WARN: warning: ignoring '-fobjc-direct-precondition-thunk' option as it is not currently supported for runtime 'gnustep-2.0' [-Woption-ignored] |
| 612 |
// CHECK_GNUSTEP_WARN-NOT: "-fobjc-direct-precondition-thunk" |
| 613 |
// RUN: %clang --target=x86_64-linux-gnu -fobjc-runtime=gcc -fobjc-direct-precondition-thunk -### -c -xobjective-c %s 2>&1 | FileCheck -check-prefix=CHECK_GCC_WARN %s |
| 614 |
// CHECK_GCC_WARN: warning: ignoring '-fobjc-direct-precondition-thunk' option as it is not currently supported for runtime 'gcc' [-Woption-ignored] |
| 615 |
// CHECK_GCC_WARN-NOT: "-fobjc-direct-precondition-thunk" |
| 616 |
|
| 617 |
// RUN: %clang -### -S -fjmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s |
| 618 |
// RUN: %clang -### -S -fjmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s |
| 619 |
// RUN: %clang -### -S -fjmc -g --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s |
| 620 |
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s |
| 621 |
// RUN: %clang -### -S -fjmc -g --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s |
| 622 |
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s |
| 623 |
// RUN: %clang -### -fjmc -g -flto -fuse-ld=lld --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s |
| 624 |
// RUN: %clang -### -fjmc -g -flto -fuse-ld=lld-link --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s |
| 625 |
// RUN: %clang -### -fjmc -g -flto --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC_LTO %s |
| 626 |
// RUN: %clang -### -fjmc -g -flto -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s |
| 627 |
// CHECK_JMC_WARN: -fjmc requires debug info. Use -g or debug options that enable debugger's stepping function; option ignored |
| 628 |
// CHECK_JMC_WARN_NOT_ELF: -fjmc works only for ELF; option ignored |
| 629 |
// CHECK_NOJMC-NOT: -fjmc |
| 630 |
// CHECK_JMC: -fjmc |
| 631 |
// CHECK_NOJMC_LTO-NOT: -plugin-opt=-enable-jmc-instrument |
| 632 |
// CHECK_JMC_LTO: -plugin-opt=-enable-jmc-instrument |
| 633 |
|
| 634 |
// RUN: %clang -### -fintegrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-INT-OBJEMITTER %s |
| 635 |
// CHECK-INT-OBJEMITTER-NOT: unsupported option '-fintegrated-objemitter' for target |
| 636 |
// RUN: not %clang -### -fno-integrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-NOINT-OBJEMITTER %s |
| 637 |
// CHECK-NOINT-OBJEMITTER: unsupported option '-fno-integrated-objemitter' for target |
| 638 |
|
| 639 |
// RUN: %clang -### --target=aarch64-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s |
| 640 |
// RUN: %clang -### --target=aarch64-windows-msvc -fms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s |
| 641 |
// RUN: %clang -### --target=aarch64-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s |
| 642 |
// RUN: %clang -### --target=x86_64-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s |
| 643 |
// RUN: %clang -### --target=x86_64-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s |
| 644 |
// RUN: %clang -### --target=i686-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-MS-VOLATILE %s |
| 645 |
// RUN: %clang -### --target=i686-windows-msvc -fno-ms-volatile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MS-VOLATILE %s |
| 646 |
// CHECK-MS-VOLATILE: -fms-volatile |
| 647 |
// CHECK-NO-MS-VOLATILE-NOT: -fms-volatile |
| 648 |
|
| 649 |
// RUN: %clang -### --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK-NO-STRICT-ALIASING %s |
| 650 |
// RUN: %clang -### --target=x86_64-pc-windows-msvc -fstrict-aliasing %s 2>&1 | FileCheck -check-prefix=CHECK-STRICT-ALIASING %s |
| 651 |
// RUN: %clang -### --target=x86_64-pc-windows-msvc -fno-strict-aliasing %s 2>&1 | FileCheck -check-prefix=CHECK-NO-STRICT-ALIASING %s |
| 652 |
// CHECK-STRICT-ALIASING-NOT: -relaxed-aliasing |
| 653 |
// CHECK-NO-STRICT-ALIASING: -relaxed-aliasing |