Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver] Enable to use C++20 standalne by -fcxx-modules
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
- Loading branch information
1 parent
ef256ed
commit 99eca83
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// This tests that we could use C++20 modules standalone. | ||
// RUN: %clang -std=c++03 -fcxx-modules -fsyntax-only -Xclang -verify %s | ||
// RUN: %clang -std=c++11 -fcxx-modules -fsyntax-only -Xclang -verify %s | ||
// RUN: %clang -std=c++14 -fcxx-modules -fsyntax-only -Xclang -verify %s | ||
// RUN: %clang -std=c++17 -fcxx-modules -fsyntax-only -Xclang -verify %s | ||
// expected-no-diagnostics | ||
export module M; |