Skip to content

Commit c07beac

Browse files
committed
Remove 'Don't emit macros about module declaration' section in StandardCPlusPlusModules.rst
Signed-off-by: yronglin <[email protected]>
1 parent cde2304 commit c07beac

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

clang/docs/StandardCPlusPlusModules.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,33 +1381,6 @@ declarations which use it. Thus, the preferred name will not be displayed in
13811381
the debugger as expected. This is tracked by
13821382
`#56490 <https://github.com/llvm/llvm-project/issues/56490>`_.
13831383

1384-
Don't emit macros about module declaration
1385-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1386-
1387-
This is covered by `P1857R3 <https://wg21.link/P1857R3>`_. It is mentioned here
1388-
because we want users to be aware that we don't yet implement it.
1389-
1390-
A direct approach to write code that can be compiled by both modules and
1391-
non-module builds may look like:
1392-
1393-
.. code-block:: c++
1394-
1395-
MODULE
1396-
IMPORT header_name
1397-
EXPORT_MODULE MODULE_NAME;
1398-
IMPORT header_name
1399-
EXPORT ...
1400-
1401-
The intent of this is that this file can be compiled like a module unit or a
1402-
non-module unit depending on the definition of some macros. However, this usage
1403-
is forbidden by P1857R3 which is not yet implemented in Clang. This means that
1404-
is possible to write invalid modules which will no longer be accepted once
1405-
P1857R3 is implemented. This is tracked by
1406-
`#54047 <https://github.com/llvm/llvm-project/issues/54047>`_.
1407-
1408-
Until then, it is recommended not to mix macros with module declarations.
1409-
1410-
14111384
Inconsistent filename suffix requirement for importable module units
14121385
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14131386

0 commit comments

Comments
 (0)