Eric Christopher | 3105627 | 2013-04-04 06:29:47 +0000 | [diff] [blame] | 1 | // 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 |
Argyrios Kyrtzidis | 9a2b9d7 | 2010-10-08 00:25:19 +0000 | [diff] [blame] | 2 | // 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 |
Ted Kremenek | 6feaf57 | 2009-12-12 00:38:18 +0000 | [diff] [blame] | 3 | |
Eric Christopher | 3105627 | 2013-04-04 06:29:47 +0000 | [diff] [blame] | 4 | // CHECK-OPTIONS1: -split-stacks |
Chandler Carruth | c304ba3 | 2010-05-22 02:21:53 +0000 | [diff] [blame] | 5 | // CHECK-OPTIONS1: -fgnu-keywords |
Ted Kremenek | 5099b80 | 2009-12-12 00:42:52 +0000 | [diff] [blame] | 6 | // CHECK-OPTIONS1: -fblocks |
| 7 | // CHECK-OPTIONS1: -fpascal-strings |
| 8 | |
Chandler Carruth | c304ba3 | 2010-05-22 02:21:53 +0000 | [diff] [blame] | 9 | // CHECK_OPTIONS2: -fno-gnu-keywords |
Dan Gohman | c31176d | 2010-01-08 02:20:44 +0000 | [diff] [blame] | 10 | // CHECK-OPTIONS2: -fmath-errno |
Daniel Dunbar | 288294f | 2009-12-13 02:00:23 +0000 | [diff] [blame] | 11 | // CHECK-OPTIONS2: -fno-builtin |
Argyrios Kyrtzidis | 9a2b9d7 | 2010-10-08 00:25:19 +0000 | [diff] [blame] | 12 | // CHECK-OPTIONS2: -fshort-enums |
Daniel Dunbar | 288294f | 2009-12-13 02:00:23 +0000 | [diff] [blame] | 13 | // CHECK-OPTIONS2: -fshort-wchar |
| 14 | // CHECK-OPTIONS2: -fno-common |
Ted Kremenek | 5099b80 | 2009-12-12 00:42:52 +0000 | [diff] [blame] | 15 | // CHECK-OPTIONS2: -fno-show-source-location |
Chandler Carruth | 50465d1 | 2011-04-23 06:30:43 +0000 | [diff] [blame] | 16 | |
| 17 | // RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s |
| 18 | // WRITE-STRINGS1: -fconst-strings |
| 19 | // RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s |
| 20 | // WRITE-STRINGS2-NOT: -fconst-strings |
| 21 | // RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s |
| 22 | // WRITE-STRINGS3: -fconst-strings |
Chandler Carruth | 1cfe3c3 | 2011-04-23 09:27:53 +0000 | [diff] [blame] | 23 | |
Chandler Carruth | f8c247d | 2011-04-23 19:48:40 +0000 | [diff] [blame] | 24 | // RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 25 | // RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 26 | // RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 27 | // RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 28 | // RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s |
| 29 | // RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 30 | // RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s |
| 31 | // DEPRECATED-ON-CHECK: -fdeprecated-macro |
| 32 | // DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro |
Lang Hames | c968671 | 2012-07-06 00:59:19 +0000 | [diff] [blame] | 33 | |
| 34 | // RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s |
| 35 | // RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s |
| 36 | // RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s |
| 37 | // FP-CONTRACT-FAST-CHECK: -ffp-contract=fast |
| 38 | // FP-CONTRACT-OFF-CHECK: -ffp-contract=off |
Chad Rosier | f925e04 | 2012-07-20 21:20:33 +0000 | [diff] [blame] | 39 | |
Chad Rosier | c04d093 | 2012-12-11 17:12:28 +0000 | [diff] [blame] | 40 | // RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 41 | // RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 42 | // RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
| 43 | // RUN: %clang -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
Chad Rosier | 10b5fa2 | 2012-12-11 17:46:33 +0000 | [diff] [blame] | 44 | // RUN: %clang -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
Nadav Rotem | 4d5b68b | 2012-12-18 23:08:58 +0000 | [diff] [blame] | 45 | // RUN: %clang -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s |
| 46 | // RUN: %clang -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
Chad Rosier | 10b5fa2 | 2012-12-11 17:46:33 +0000 | [diff] [blame] | 47 | // RUN: %clang -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s |
Chad Rosier | c04d093 | 2012-12-11 17:12:28 +0000 | [diff] [blame] | 48 | // CHECK-VECTORIZE: "-vectorize-loops" |
Chad Rosier | c04d093 | 2012-12-11 17:12:28 +0000 | [diff] [blame] | 49 | // CHECK-NO-VECTORIZE-NOT: "-vectorize-loops" |
Hal Finkel | 443c999 | 2012-12-11 19:59:32 +0000 | [diff] [blame] | 50 | |
| 51 | // RUN: %clang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 52 | // RUN: %clang -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 53 | // RUN: %clang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 54 | // RUN: %clang -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
| 55 | // RUN: %clang -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
Nadav Rotem | 4d5b68b | 2012-12-18 23:08:58 +0000 | [diff] [blame] | 56 | // RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s |
| 57 | // RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
Hal Finkel | 443c999 | 2012-12-11 19:59:32 +0000 | [diff] [blame] | 58 | // RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s |
Nadav Rotem | 50ea963 | 2013-04-15 04:57:18 +0000 | [diff] [blame] | 59 | // CHECK-SLP-VECTORIZE: "-vectorize-slp" |
| 60 | // CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp" |
Jordan Rose | 1975c17 | 2013-02-06 18:15:40 +0000 | [diff] [blame] | 61 | |
Nadav Rotem | 3c6a9b0 | 2013-04-15 05:38:41 +0000 | [diff] [blame] | 62 | // RUN: %clang -### -S -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s |
| 63 | // RUN: %clang -### -S -fno-slp-vectorize-aggressive -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s |
| 64 | // RUN: %clang -### -S -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s |
| 65 | // RUN: %clang -### -S -fslp-vectorize-aggressive -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s |
| 66 | // CHECK-SLP-VECTORIZE-AGG: "-vectorize-slp-aggressive" |
| 67 | // CHECK-NO-SLP-VECTORIZE-AGG-NOT: "-vectorize-slp-aggressive" |
| 68 | |
Jordan Rose | 1975c17 | 2013-02-06 18:15:40 +0000 | [diff] [blame] | 69 | // RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s |
| 70 | // RUN: %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s |
| 71 | // CHECK-EXTENDED-IDENTIFIERS: "-cc1" |
| 72 | // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" |
| 73 | // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers' |