Files
clang-p2996/clang/test/Driver/x-args.c
huangqinjin 06b5a7c205 [clang][driver] Support -x for all languages in CL mode (#89772)
After https://github.com/llvm/llvm-project/pull/68921, clang-cl gained
option `-x` but only for CUDA/HIP. This commit simply removes the
restriction on parameters to `-x`. Especially, it is able to use `-x
c++-module` and `-x c++-system-header` to build C++20 modules and header
units with clang-cl.

This effectively reverts commit
fe082124fa.

Closes https://github.com/llvm/llvm-project/issues/88006.
2024-05-23 22:39:17 -07:00

10 lines
423 B
C

// RUN: %clang -fsyntax-only -Werror -xc %s
// RUN: %clang -fsyntax-only -Werror %s -xc %s
// RUN: %clang -fsyntax-only %s -xc++ -fsyntax-only 2>&1 | FileCheck %s
// RUN: %clang -fsyntax-only -xc %s -xc++ -fsyntax-only 2>&1 | FileCheck %s
// RUN: %clang -fsyntax-only %s -xc %s -xc++ -fsyntax-only 2>&1 | FileCheck %s
// CHECK: '-x c++' after last input file has no effect
// RUN: %clang_cl -fsyntax-only /WX -xc++ -- %s