27 Commits

Author SHA1 Message Date
Chuanqi Xu
22043643c6 [docs] [C++20] [Modules] Add document for the case of duplicated '-fmodule-file=<module-name>='
This patch clarifies that in case there are multiple
'-fmodule-file=<module-name>=' optins for the same `<module-name>`,
the last '-fmodule-file=<module-name>=' will override the previous
'-fmodule-file=<module-name>=' option.
2023-10-30 11:25:21 +08:00
Chuanqi Xu
be72dca5e3 [docs] [C++20] [Modules] Mentioning that -fdelayed-template-parsing is not working with modules
Catched in https://github.com/llvm/llvm-project/issues/61068.

Add this to the document to avoid further misunderstandings.
2023-10-16 10:38:33 +08:00
Mark de Wever
c73de29691 [clang][doc] Mentions -Wno-reserved-module-identifiers
This is a nicer way to suppress the diagnostic instead of using the
pre-processor work-around.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D158523
2023-08-23 18:31:29 +02:00
Chuanqi Xu
f6b94e0026 [NFC] Document the solution to pr61006 and a test for it
Address https://github.com/llvm/llvm-project/issues/61006.

The actual reason for the issue is about the usage of clang-scan-deps
instead of its functionalities since clang-scan-deps has
already considered the problem before for clang modules.

So this patch tries to document the corresponding solution
and add a test case for it to address the issue.
2023-08-11 14:57:32 +08:00
Chuanqi Xu
3b48613f2d [docs] [C++20] [Modules] Mark the compatiblity issue within clang-cl.exe
See
https://discourse.llvm.org/t/clang-cl-exe-support-for-c-modules/72257
for details. Simply, the user of clang-cl.exe can't get a good
experience with C++20 modules now. While we don't have resources to
support it well now, we should make it clear in the documentation.
2023-07-26 15:06:13 +08:00
Chuanqi Xu
5e601ad3bc [NFC] Add a blank line after directives in StandardCPlusPlusModules.rst 2023-07-19 16:10:55 +08:00
Chuanqi Xu
0d6ea6fc3b [NFC] [C++20] [Modules] Add a performance tip to the document
It is a known problem that the compiler isn't efficiency when there are
a lot of duplications in the modules to developers. But it may not be
verbose to the (potential) new users of C++20 modules.

It may be necessary to mention this in the document.
2023-07-19 15:49:56 +08:00
Nikolas Klauser
f6d557ee34 [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs
A lot of editors remove trailing whitespaces. This patch removes any trailing whitespaces and makes sure that no new ones are added.

Reviewed By: erichkeane, paulkirth, #libc, philnik

Spies: wangpc, aheejin, MaskRay, pcwang-thead, cfe-commits, libcxx-commits, dschuff, nemanjai, arichardson, kbarton, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, s.egerton, sameer.abuasal, apazos, luismarques, martong, frasercrmck, steakhal, luke

Differential Revision: https://reviews.llvm.org/D151963
2023-06-26 09:34:36 -07:00
Kazu Hirata
2db0812882 [clang] Fix typos in documentation 2023-05-12 23:19:17 -07:00
Chuanqi Xu
7adf3849e4 [docs] [C++20] [Modules] Remove the section 'Source content consistency'
Since the C++20 named modules won't check source files consistency after
5b388f8, it would be better to remove this section in the document.
2023-05-10 09:59:50 +08:00
Mark de Wever
ba15d186e5 [clang] Use -std=c++23 instead of -std=c++2b
During the ISO C++ Committee meeting plenary session the C++23 Standard
has been voted as technical complete.

This updates the reference to c++2b to c++23 and updates the __cplusplus
macro.

Drive-by fixes c++1z -> c++17 and c++2a -> c++20 when seen.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D149553
2023-05-04 19:19:52 +02:00
Chuanqi Xu
20d9aa1a43 [doc] [C++20] [Modules] Document that the interfaces of header units is experimental
Close https://github.com/llvm/llvm-project/issues/62241

In tooling group (SG15), it is still unclear how tools should support
header units. Add a warning in the documentation to avoid further
confusions.
2023-04-21 10:43:24 +08:00
Chuanqi Xu
1b5980997b [C++20] [Modules] Don't create duplicated deduction guides for duplicated classes
Close https://github.com/llvm/llvm-project/issues/56916

Within C++20 modules, we may have multiple same constructors in
multiple same RecordDecls. And it doesn't make sense naturally to create
duplicated deduction guides for the duplicated constructors.
2023-03-28 17:51:38 +08:00
Chuanqi Xu
684955a230 [Modules] [doc] Document the problem that we can't include headers before import declarations 2023-03-17 15:10:37 +08:00
Chuanqi Xu
e264fe89e3 [doc] [Modules] Document how to implement ABI compatible code in module units 2023-03-13 16:44:10 +08:00
Chuanqi Xu
1c33c419e4 [doc] Deprecate the '-fmodule-file=<module-name>=<path-BMI>' for named modules in the document
The option '-fmodule-file=<module-name>=<path-BMI>' is already
deprecated now. This patch mentions it in the document.
2023-03-09 16:20:01 +08:00
Mark de Wever
8dbeb41f8e [clang] Documents clang-scan-deps requirements.
This was discussed in https://llvm.org/PR61006.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D144894
2023-02-28 18:16:28 +01:00
Mark de Wever
a7b6978285 [clang][doc] Removes obsolete comment.
After reading about the documentation improvements on LLVM weekly this
part seems obsolete.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D144497
2023-02-22 17:17:36 +01:00
Chuanqi Xu
9c4f0d83f6 [docs] Add document for clang-scan-deps -format=p1689
The patches for `clang-scan-deps` have been landed. And we need to
document the behavior then.
2023-02-14 14:00:12 +08:00
Chuanqi Xu
1782e8f9e8 [C++20] [Modules] Allow -fmodule-file=<module-name>=<BMI-Path> for implementation unit and document the behavior
Close https://github.com/llvm/llvm-project/issues/57293.

Previsouly we can't use `-fmodule-file=<module-name>=<BMI-Path>` for
implementation units, it is a bug. Also the behavior of the above option
is not tested nor documented for C++20 Modules. This patch addresses the
2 problems.
2023-02-08 16:45:00 +08:00
Mark de Wever
c8d16bf304 [clang][doc] Fixes formatting of a text block. 2023-01-22 16:21:11 +01:00
Chuanqi Xu
046a9910c3 Add Release Notes and Doc for -fmodule-output
As the summary explained in https://reviews.llvm.org/D137058,
the design of `-fmodule-output` changes relatively frequently
so I skipped the release notes and docs for -fmodule-output in the
the patches. And the patches get accepted and landed. The patch adds
the related release notes and docs.
2023-01-16 17:01:41 +08:00
Chuanqi Xu
de034cf313 [NFC] Fix the typo and the format in the StandardCPlusPlusModules
document
2022-11-15 22:53:43 +08:00
Chuanqi Xu
04fb3e3de7 [C++20] [Modules] Document the behavior about reserved module names
We would diagnose about the reserved names in b8ceb9f4e4bd. And the
patch documents about the related behaviors.
2022-11-10 16:43:50 +08:00
Chuanqi Xu
e12b627a35 [docs] Add the description about mixing use of clang modules and c++
modules

From the discussion in
https://discourse.llvm.org/t/how-should-we-support-dependency-scanner-for-c-20-modules/66027,
we get a consensus that we want to support clang modules and c++ modules
at the same time. This patch documents this intention.

Reviewed By: bruno

Differential Revision: https://reviews.llvm.org/D136221
2022-10-31 16:02:43 +08:00
Chuanqi Xu
baa9eae279 [NFC] fix incorrect indentation in docs 2022-09-05 11:05:23 +08:00
Chuanqi Xu
b1d5af8124 [docs] Add "Standard C++ Modules"
We get some standard C++ module things done in clang15.x. But we lack a
user documentation for it. The implementation of standard C++ modules
share a big part of codes with clang modules. But they have very
different semantics and user interfaces, so I think it is necessary to
add a document for Standard C++ modules. Previously, there were also
some people ask the document for standard C++ Modules and I couldn't
offer that time.

Reviewed By: iains, Mordante, h-vetinari, ruoso, dblaikie, JohelEGP,
aaronmondal

Differential Revision: https://reviews.llvm.org/D131388
2022-08-31 11:09:46 +08:00