[clang] [clang][modules-driver] Add support for C++ named modules and `import std` (PR #193312)

Naveen Seth Hanig via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 22 01:58:17 PDT 2026


naveen-seth wrote:

> Crash is bad. But I think if the name are duplicated we should try to diagnose and reject instead of accept it. Named module has names and clang header modules has name too. So this is a user/build system problem to me. Naturally duplicated module name issue.

I feel that it coould be acceptable for a named module and a Clang module to share the same name. libc++ currently implements the `std` named module using a Clang module also named `std`, and that feels reasonable to me.

<img width="7476" height="1400" alt="graphviz" src="https://github.com/user-attachments/assets/9534e4d5-b8e2-453c-a115-b68300f00d8b" />

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


More information about the cfe-commits mailing list