summaryrefslogtreecommitdiff
path: root/clang/test/Driver/modules.cpp
AgeCommit message (Collapse)Author
2025-09-20[Driver] [C++20] [Modules] Fix --precompile with -fmodule-outputChuanqi Xu
Close https://github.com/llvm/llvm-project/issues/159780
2025-07-21[C++20] [Modules] Enable reduced BMI by defaultChuanqi Xu
As documented in 20.x, we'd like to keep reduced BMI off by default for 1~2 versions. And now we're in 22.x. I rarely receive bug reports for reduced BMI. I am not sure about the reason. Maybe not a lot of people are using it. Or it is really stable enough. And also, we've been enabling the reduced BMI internally for roughly half a year. So I think it's the time to move on. See the document changes for other information.
2025-06-21[C++][Modules] A module directive may only appear as the first preprocessing ↵yronglin
tokens in a file (#144233) This PR is 2nd part of [P1857R3](https://github.com/llvm/llvm-project/pull/107168) implementation, and mainly implement the restriction `A module directive may only appear as the first preprocessing tokens in a file (excluding the global module fragment.)`: [cpp.pre](https://eel.is/c++draft/cpp.pre): ``` module-file: pp-global-module-fragment[opt] pp-module group[opt] pp-private-module-fragment[opt] ``` We also refine tests use `split-file` instead of conditional macro. Signed-off-by: yronglin <yronglin777@gmail.com>
2023-05-18[clang/Driver] Also consider `gnu++` standard when checking for modules supportArgyrios Kyrtzidis
Differential Revision: https://reviews.llvm.org/D150473
2023-01-20[Clang][test] Avoid FileCheck error when matching `-cc1`hezuoqiang
FileCheck patterns consisting of only `-cc1` on a line by itself often cause mismatches, e.g. with version strings formed from commit hashes such as "clang-cc1514432c58". They should be changed to contain more context and match more precisely. Differential Revision: https://reviews.llvm.org/D141886
2022-11-18[C++20] [Modules] Remove unmaintained Header ModuleChuanqi Xu
Currently there is a -emit-header-module mode, which can combine several headers together as a module interface. However, this breaks our assumption (for standard c++ modules) about module interface. The module interface should come from a module interface unit. And if it is a header, it should be a header unit. And currently we have no ideas to combine several headers together. So I think this mode is an experimental one and it is not maintained and it is not used. So it will be better to remove them. Reviewed By: Bigcheese, dblaikie, bruno Differential Revision: https://reviews.llvm.org/D137609
2022-06-24Revert "[Driver][test] Replace ^//$ with empty string"Fangrui Song
This reverts commit 4817b7729a1846b709ec02b98bfe11b0125f8e8f. It caused some `^/\n` and had some objection about its readability improvement.
2022-06-24[Driver][test] Replace ^//$ with empty stringFangrui Song
The convention does not add //\n. Having all RUN/CHECK lines separated by //\n makes editor movement difficult (e.g. { } in Vim).
2022-06-01Revert "[Driver] Enable to use C++20 standalne by -fcxx-modules"Adrian Prantl
This reverts commit a544710cd43ba9f7729a613c58729f146e792a8e. See discussion in D120540. This breaks C++ Clang modules on Darwin and also more than a dozen tests in the LLDB testsuite. I think we need to be more careful to separate out the enabling of Clang C++ modules and C++20 modules. Either by having -fmodules-ts control the HaveModules flag, or by adding a way to explicitly turn them off.
2022-06-01Revert "[NFC] Use %clang instead of %clang++ in tests"Adrian Prantl
This reverts commit 738c20e6df01217b6364c3b75d0ced6b6fb6277e as a dependency of D120540.
2022-06-01Revert "[Driver][Modules] Remove dependence on linking support from ↵Adrian Prantl
clang/test/Driver/modules.cpp" This reverts commit 35b1cfc76f08faabf3f27c0bd054acc7c854a6ca as a dependency of D120540.
2022-05-31[Driver][Modules] Remove dependence on linking support from ↵Daniel McIntosh
clang/test/Driver/modules.cpp The new tests in clang/test/Driver/modules.cpp added by D120540 will fail if the toolchain getting tested doesn't support linking. This reduces the utility of the test since we would like a failure of this test to reflect a problem with modules. We should already have other tests that validate linking support. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D126669
2022-05-30[NFC] Use %clang instead of %clang++ in testsChuanqi Xu
Previously the tests uses %clang++ instead of %clang, which cause the test fail in windows.
2022-05-30[Driver] Enable to use C++20 standalne by -fcxx-modulesChuanqi Xu
This patch allows user to use C++20 module by -fcxx-modules. Previously, we could only use it under -std=c++20. Given that user could use C++20 coroutine standalonel by -fcoroutines-ts. It makes sense to offer an option to use C++20 modules without enabling C++20. Reviewed By: iains, MaskRay Differential Revision: https://reviews.llvm.org/D120540
2022-05-30Revert "[Driver] Enable to use C++20 standalne by -fcxx-modules"Chuanqi Xu
This reverts commit 99eca8353808f63670c647aeae03e0ce66eb21e0. Since it would cause clang-tools-extra fail.
2022-05-30[Driver] Enable to use C++20 standalne by -fcxx-modulesChuanqi Xu
This patch allows user to use C++20 module by -fcxx-modules. Previously, we could only use it under -std=c++20. Given that user could use C++20 coroutine standalonel by -fcoroutines-ts. It makes sense to offer an option to use C++20 modules without enabling C++20. Reviewed By: iains, MaskRay Differential Revision: https://reviews.llvm.org/D120540
2020-08-24Properly pass modules flags to frontend when using -std=c++20 instead of ↵Richard Smith
-std=c++2a. In passing, also teach the driver to map /std:c++latest to -std=c++20 not -std=c++2a.
2019-09-30Fix Driver/modules.cpp test to work when build directory name contains '.s'Tom Stellard
Reviewers: dyung, rsmith, hansw Subscribers: mati865, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66176 llvm-svn: 373275
2019-04-16Modify test to use -S instead of -c so that it works when an external ↵Douglas Yung
assembler is used that is not present. llvm-svn: 358537
2019-04-16Tweak test to pass when using a non-integrated assembler.Richard Smith
llvm-svn: 358470
2019-04-14[c++20] Enable driver and frontend support for building and usingRichard Smith
modules when -std=c++2a is specified. llvm-svn: 358355