summaryrefslogtreecommitdiff
path: root/clang/test/Driver/clang_f_opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Driver/clang_f_opts.c')
-rw-r--r--clang/test/Driver/clang_f_opts.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
new file mode 100644
index 0000000..4eed4aa
--- /dev/null
+++ b/clang/test/Driver/clang_f_opts.c
@@ -0,0 +1,31 @@
+// 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 %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
+// 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
+
+// CHECK-OPTIONS1: -fgnu-keywords
+// CHECK-OPTIONS1: -fblocks
+// CHECK-OPTIONS1: -fpascal-strings
+
+// CHECK_OPTIONS2: -fno-gnu-keywords
+// CHECK-OPTIONS2: -fmath-errno
+// CHECK-OPTIONS2: -fno-builtin
+// CHECK-OPTIONS2: -fshort-enums
+// CHECK-OPTIONS2: -fshort-wchar
+// CHECK-OPTIONS2: -fno-common
+// CHECK-OPTIONS2: -fno-show-source-location
+
+// RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s
+// WRITE-STRINGS1: -fconst-strings
+// RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s
+// WRITE-STRINGS2-NOT: -fconst-strings
+// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s
+// WRITE-STRINGS3: -fconst-strings
+
+// RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
+// RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
+// RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
+// RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
+// RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
+// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
+// RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
+// DEPRECATED-ON-CHECK: -fdeprecated-macro
+// DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro