32 lines · c
1// Note: we have to quote the /? option, otherwise some shells will try to2// expand the ? into a one-letter filename in the root directory, and make3// the test fail is such a file or directory exists.4 5// Note: %s must be preceded by --, otherwise it may be interpreted as a6// command-line option, e.g. on Mac where %s is commonly under /Users.7 8// Check that clang-cl options are not available by default.9// RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT10// DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS11// DEFAULT-NOT: {{/[?]}}12// DEFAULT-NOT: /help13// RUN: not %clang "/?"14// RUN: not %clang -?15// RUN: not %clang /help16 17// Check that /? and /help are available as clang-cl options.18// RUN: %clang_cl "/?" | FileCheck %s -check-prefix=CL19// RUN: %clang_cl /help | FileCheck %s -check-prefix=CL20// RUN: %clang_cl -help | FileCheck %s -check-prefix=CL21// CL: CL.EXE COMPATIBILITY OPTIONS22// CL: {{/[?]}}23// CL: /help24 25// Options which are not "core" clang options nor cl.exe compatible options26// are not available in clang-cl.27// DEFAULT: -fapple-kext28// CL-NOT: -fapple-kext29 30// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=COMPILE %s31// COMPILE: "-fdiagnostics-format" "msvc"32