Files
clang-p2996/clang/test/Driver/cl-cxx20-modules.cppm
Sharadh Rajaraman 9d315bc45f [clang][driver][clang-cl] Fix unused argument warning for /std:c++20 for precompiled module inputs to clang-cl (#99300)
Relates to #98761: `-fmodule-file` requires `/std:c++20` or greater, but
passing that option results in an unused argument warning. This resolves
that.
2024-08-08 10:00:31 +08:00

17 lines
731 B
C++

// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: %clang_cl /std:c++20 --precompile -### -- %s 2>&1 | FileCheck --check-prefix=PRECOMPILE %s
// PRECOMPILE: -emit-module-interface
// RUN: %clang_cl /std:c++20 --fmodule-file=Foo=Foo.pcm -### -- %s 2>&1 | FileCheck --check-prefix=FMODULEFILE %s
// FMODULEFILE: -fmodule-file=Foo=Foo.pcm
// RUN: %clang_cl /std:c++20 --fprebuilt-module-path=. -### -- %s 2>&1 | FileCheck --check-prefix=FPREBUILT %s
// FPREBUILT: -fprebuilt-module-path=.
// RUN: %clang_cl %t/test.pcm /std:c++20 -### 2>&1 | FileCheck --check-prefix=CPP20WARNING %t/test.pcm
//--- test.pcm
// CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation: '/std:c++20' [-Wunused-command-line-argument]