Hans Wennborg | 4a9ca97 | 2013-07-29 18:40:38 +0000 | [diff] [blame] | 1 | // Don't attempt slash switches on msys bash. |
| 2 | // REQUIRES: shell-preserves-root |
| 3 | |
| 4 | // Note: we have to quote the /? option, otherwise some shells will try to |
| 5 | // expand the ? into a one-letter filename in the root directory, and make |
| 6 | // the test fail is such a file or directory exists. |
Hans Wennborg | 9447809 | 2013-07-27 06:19:03 +0000 | [diff] [blame] | 7 | |
Hans Wennborg | 614f707 | 2013-08-08 19:54:30 +0000 | [diff] [blame] | 8 | // Note: %s must be preceded by --, otherwise it may be interpreted as a |
| 9 | // command-line option, e.g. on Mac where %s is commonly under /Users. |
| 10 | |
Hans Wennborg | 6ddc690 | 2013-07-27 00:23:45 +0000 | [diff] [blame] | 11 | // Check that clang-cl options are not available by default. |
| 12 | // RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT |
| 13 | // DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS |
| 14 | // DEFAULT-NOT: {{/[?]}} |
| 15 | // DEFAULT-NOT: /help |
Hans Wennborg | 4a9ca97 | 2013-07-29 18:40:38 +0000 | [diff] [blame] | 16 | // RUN: not %clang "/?" |
Hans Wennborg | 6ddc690 | 2013-07-27 00:23:45 +0000 | [diff] [blame] | 17 | // RUN: not %clang -? |
Hans Wennborg | 4a9ca97 | 2013-07-29 18:40:38 +0000 | [diff] [blame] | 18 | // RUN: not %clang /help |
Hans Wennborg | e4b031c | 2013-07-19 20:33:20 +0000 | [diff] [blame] | 19 | |
Hans Wennborg | 4a9ca97 | 2013-07-29 18:40:38 +0000 | [diff] [blame] | 20 | // Check that /? and /help are available as clang-cl options. |
| 21 | // RUN: %clang_cl "/?" | FileCheck %s -check-prefix=CL |
| 22 | // RUN: %clang_cl /help | FileCheck %s -check-prefix=CL |
Hans Wennborg | 6ddc690 | 2013-07-27 00:23:45 +0000 | [diff] [blame] | 23 | // RUN: %clang_cl -help | FileCheck %s -check-prefix=CL |
| 24 | // CL: CL.EXE COMPATIBILITY OPTIONS |
| 25 | // CL: {{/[?]}} |
| 26 | // CL: /help |
| 27 | |
| 28 | // Options which are not "core" clang options nor cl.exe compatible options |
| 29 | // are not available in clang-cl. |
| 30 | // DEFAULT: -fapple-kext |
| 31 | // CL-NOT: -fapple-kext |
Hans Wennborg | 614f707 | 2013-08-08 19:54:30 +0000 | [diff] [blame] | 32 | |
Hans Wennborg | 81f7448 | 2013-09-10 01:07:07 +0000 | [diff] [blame^] | 33 | // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=COMPILE %s |
| 34 | // COMPILE: "-cxx-abi" "microsoft" |
| 35 | // COMPILE: "-fdiagnostics-format" "msvc" |