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

via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 10 08:33:34 PST 2025


yronglin wrote:

> It seems that the code is currently checking for the `module` or `import` at the start of the line _after_ macro expansion:
> 
> ```c++
> #define IMPORT import
> template <typename T>
> struct import;
> 
> extern
> IMPORT<int> a;
> ```
> 
> is supposed to compile (based on the wording).
> 
> Accepted with `IMPORT`: https://godbolt.org/z/v16sEd5jK Rejected with `import` (except for Clang, which is waiting for this PR): https://godbolt.org/z/Gz11axThf

Yeah, after this PR, the `import<int> a;` can be compiled. 


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


More information about the cfe-commits mailing list