[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 11:03:45 PDT 2025


yronglin wrote:

> I think we should implement CWG2947 as written and allow that. CWG2947 has not yet been accepted, but I don't believe there will be issues there.

I've temporarily added CWG2947 support in the patch. 

This needs tests for `-E`.

> The line separation is not getting maintained:
> ```cpp
> export module m; int x;
> extern "C++" int *y = &x;
> ```
> 
> Output:
> ```
> # 1 "<stdin>"
> # 1 "<built-in>" 1
> # 1 "<built-in>" 3
> # 665 "<built-in>" 3
> # 1 "<command line>" 1
> # 1 "<built-in>" 2
> # 1 "<stdin>" 2
> export module m; int x;extern "C++" int *y = &x;
> ```

Hmm yes, this is a bug in current implementation. I'll fix this later.


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


More information about the cfe-commits mailing list