[clang] [docs] [C++20] [Modules] Offer a method to use clang module map with named modules (PR #178368)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 29 06:16:45 PST 2026


================
@@ -1320,6 +1320,280 @@ indirectly imported internal partition units are not reachable.
 The suggested approach for using an internal partition unit in Clang is
 to only import them in the implementation unit.
 
+Using Clang Module Map to Avoid mixing #include and import problems
+-------------------------------------------------------------------
+
+.. note::
+  Discussion in this section is experimental.
+
+Problems Background
+~~~~~~~~~~~~~~~~~~~
+
+As discussed before, the redeclaration in different TU is one of the major problems
+of using modules from the perspective of the compiler. The redeclaration pattern
+is a major trigger of compiler bugs. And even if the compiler accepts the redeclaration
+pattern as expected, the compilation performance will be affected too.
----------------
waruqi wrote:

I tried it, and clang doesn't seem to be throwing any errors. Also, does msvc/gcc have the same problem?

https://github.com/llvm/llvm-project/pull/178368


More information about the cfe-commits mailing list