
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 fe082124faa8455cc9a68be5fdf10fc46a4d066c. Closes https://github.com/llvm/llvm-project/issues/88006.
10 lines
423 B
C
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
|