diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/Driver/cl-options.c | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) | |
download | src-test2-5e20cdd81c44a443562a09007668ffdf76c455af.tar.gz src-test2-5e20cdd81c44a443562a09007668ffdf76c455af.zip |
Notes
Diffstat (limited to 'test/Driver/cl-options.c')
-rw-r--r-- | test/Driver/cl-options.c | 84 |
1 files changed, 73 insertions, 11 deletions
diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index d9fcaf46692e..244e6869d0d5 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -30,6 +30,27 @@ // EP: "-P" // EP: "-o" "-" +// RUN: %clang_cl /fp:fast /fp:except -### -- %s 2>&1 | FileCheck -check-prefix=fpexcept %s +// fpexcept-NOT: -menable-unsafe-fp-math + +// RUN: %clang_cl /fp:fast /fp:except /fp:except- -### -- %s 2>&1 | FileCheck -check-prefix=fpexcept_ %s +// fpexcept_: -menable-unsafe-fp-math + +// RUN: %clang_cl /fp:precise /fp:fast -### -- %s 2>&1 | FileCheck -check-prefix=fpfast %s +// fpfast: -menable-unsafe-fp-math +// fpfast: -ffast-math + +// RUN: %clang_cl /fp:fast /fp:precise -### -- %s 2>&1 | FileCheck -check-prefix=fpprecise %s +// fpprecise-NOT: -menable-unsafe-fp-math +// fpprecise-NOT: -ffast-math + +// RUN: %clang_cl /fp:fast /fp:strict -### -- %s 2>&1 | FileCheck -check-prefix=fpstrict %s +// fpstrict-NOT: -menable-unsafe-fp-math +// fpstrict-NOT: -ffast-math + +// RUN: %clang_cl /GA -### -- %s 2>&1 | FileCheck -check-prefix=GA %s +// GA: -ftls-model=local-exec + // RTTI is on by default; just check that we don't error. // RUN: %clang_cl /Zs /GR -- %s 2>&1 @@ -42,6 +63,13 @@ // RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s // Gy_-NOT: -ffunction-sections +// RUN: %clang_cl /Gs -### -- %s 2>&1 | FileCheck -check-prefix=Gs %s +// Gs: "-mstack-probe-size=0" +// RUN: %clang_cl /Gs0 -### -- %s 2>&1 | FileCheck -check-prefix=Gs0 %s +// Gs0: "-mstack-probe-size=0" +// RUN: %clang_cl /Gs4096 -### -- %s 2>&1 | FileCheck -check-prefix=Gs4096 %s +// Gs4096: "-mstack-probe-size=4096" + // RUN: %clang_cl /Gw -### -- %s 2>&1 | FileCheck -check-prefix=Gw %s // Gw: -fdata-sections @@ -84,6 +112,12 @@ // RUN: %clang_cl /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s // Oy_: -mdisable-fp-elim +// RUN: %clang_cl /Qvec -### -- %s 2>&1 | FileCheck -check-prefix=Qvec %s +// Qvec: -vectorize-loops + +// RUN: %clang_cl /Qvec /Qvec- -### -- %s 2>&1 | FileCheck -check-prefix=Qvec_ %s +// Qvec_-NOT: -vectorize-loops + // RUN: %clang_cl /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes %s // showIncludes: --show-includes @@ -116,6 +150,12 @@ // RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s // VMX: '/vms' not allowed with '/vmm' +// RUN: %clang_cl /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s +// VOLATILE-ISO-NOT: "-fms-volatile" + +// RUN: %clang_cl /volatile:ms -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-MS %s +// VOLATILE-MS: "-fms-volatile" + // RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s // W0: -w @@ -164,18 +204,19 @@ // NOSTRICT: "-relaxed-aliasing" // For some warning ids, we can map from MSVC warning to Clang warning. -// RUN: %clang_cl -wd4005 -### -- %s 2>&1 | FileCheck -check-prefix=wd4005 %s -// wd4005: "-cc1" -// wd4005: "-Wno-macro-redefined" +// RUN: %clang_cl -wd4005 -wd4996 -### -- %s 2>&1 | FileCheck -check-prefix=Wno %s +// Wno: "-cc1" +// Wno: "-Wno-macro-redefined" +// Wno: "-Wno-deprecated-declarations" // Ignored options. Check that we don't get "unused during compilation" errors. -// (/Zs is for syntax-only) -// RUN: %clang_cl /Zs \ +// RUN: %clang_cl /c \ // RUN: /analyze- \ // RUN: /cgthreads4 \ // RUN: /cgthreads8 \ // RUN: /d2Zi+ \ // RUN: /errorReport:foo \ +// RUN: /Fdfoo \ // RUN: /FS \ // RUN: /Gd \ // RUN: /GF \ @@ -184,6 +225,7 @@ // RUN: /nologo \ // RUN: /Ob1 \ // RUN: /Ob2 \ +// RUN: /openmp- \ // RUN: /RTC1 \ // RUN: /sdl \ // RUN: /sdl- \ @@ -196,6 +238,8 @@ // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s // IGNORED-NOT: argument unused during compilation // IGNORED-NOT: no such file or directory +// Don't confuse /openmp- with the /o flag: +// IGNORED-NOT: "-o" "penmp-.obj" // Ignored options and compile-only options are ignored for link jobs. // RUN: touch %t.obj @@ -223,11 +267,9 @@ // RUN: /FAu \ // RUN: /favor:blend \ // RUN: /FC \ -// RUN: /Fdfoo \ // RUN: /Fifoo \ // RUN: /Fmfoo \ // RUN: /FpDebug\main.pch \ -// RUN: /fp:precise \ // RUN: /Frfoo \ // RUN: /FRfoo \ // RUN: /FU foo \ @@ -245,7 +287,6 @@ // RUN: /Gm- \ // RUN: /Gr \ // RUN: /GS \ -// RUN: /Gs1000 \ // RUN: /GT \ // RUN: /GX \ // RUN: /Gv \ @@ -302,17 +343,38 @@ // RTTI-NOT: "-fno-rtti-data" // RTTI-NOT: "-fno-rtti" +// thread safe statics are off for versions < 19. +// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=NoThreadSafeStatics %s +// RUN: %clang_cl /Zc:threadSafeInit /Zc:threadSafeInit- /c -### -- %s 2>&1 | FileCheck -check-prefix=NoThreadSafeStatics %s +// NoThreadSafeStatics: "-fno-threadsafe-statics" + +// RUN: %clang_cl /Zc:threadSafeInit /c -### -- %s 2>&1 | FileCheck -check-prefix=ThreadSafeStatics %s +// ThreadSafeStatics-NOT: "-fno-threadsafe-statics" + +// RUN: %clang_cl -fmsc-version=1800 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX11 %s +// CXX11: -std=c++11 + +// RUN: %clang_cl -fmsc-version=1900 -TP -### -- %s 2>&1 | FileCheck -check-prefix=CXX14 %s +// CXX14: -std=c++14 + // Accept "core" clang options. -// (/Zs is for syntax-only) +// (/Zs is for syntax-only, -Werror makes it fail hard on unknown options) // RUN: %clang_cl \ // RUN: --driver-mode=cl \ +// RUN: -fcolor-diagnostics \ +// RUN: -fno-color-diagnostics \ +// RUN: -fdiagnostics-color \ +// RUN: -fno-diagnostics-color \ +// RUN: -fdiagnostics-parseable-fixits \ // RUN: -ferror-limit=10 \ // RUN: -fmsc-version=1800 \ // RUN: -fno-strict-aliasing \ // RUN: -fstrict-aliasing \ +// RUN: -fsyntax-only \ // RUN: -mllvm -disable-llvm-optzns \ -// RUN: -Wunused-variables \ -// RUN: /Zs -- %s 2>&1 +// RUN: -Wunused-variable \ +// RUN: -fmacro-backtrace-limit=0 \ +// RUN: -Werror /Zs -- %s 2>&1 void f() { } |