[PATCH] D158523: [clang][doc] Mentions -Wno-reserved-module-identifiers

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 22 09:22:01 PDT 2023


Mordante created this revision.
Mordante added a reviewer: ChuanqiXu.
Herald added a project: All.
Mordante requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This is a nicer way to suppress the diagnostic instead of using the
pre-processor work-around.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158523

Files:
  clang/docs/StandardCPlusPlusModules.rst


Index: clang/docs/StandardCPlusPlusModules.rst
===================================================================
--- clang/docs/StandardCPlusPlusModules.rst
+++ clang/docs/StandardCPlusPlusModules.rst
@@ -313,18 +313,8 @@
     __test
     // and so on ...
 
-If you still want to use the reserved module names for any reason, currently you can add a special line marker
-in the front of the module declaration like:
-
-.. code-block:: c++
-
-  # __LINE_NUMBER__ __FILE__ 1 3
-  export module std;
-
-Here the `__LINE_NUMBER__` is the actual line number of the corresponding line. The `__FILE__` means the filename
-of the translation unit. The `1` means the following is a new file. And `3` means this is a system header/file so
-the certain warnings should be suppressed. You could find more details at:
-https://gcc.gnu.org/onlinedocs/gcc-3.0.2/cpp_9.html.
+If you still want to use the reserved module names for any reason, use
+``-Wno-reserved-module-identifier`` to suppress the warning.
 
 How to specify the dependent BMIs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158523.552402.patch
Type: text/x-patch
Size: 1067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230822/f90b7b5b/attachment.bin>


More information about the cfe-commits mailing list