[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 24 09:46:23 PDT 2025
yronglin wrote:
> Macro expansion is supposed to be allowed in a module directive. See also https://cplusplus.github.io/CWG/issues/2947.html.
>
> ```c++
> export module m ATTR();
> // expected-no-diagnostics
> ```
>
> ```
> $ clang -cc1 -verify -std=c++26 moduleattrib.cc -D'ATTR(X)=[[X]]'
> error: 'expected-error' diagnostics seen but not expected:
> File moduleattrib.cc Line 1: 'module' directive must end with a ';' on the same line
> File moduleattrib.cc Line 1: a type specifier is required for all declarations
> 2 errors generated.
> Return: 0x01:1 Sun Sep 21 18:09:33 2025 EDT
> ```
>
> ```
> $ oldclang -cc1 -verify -std=c++26 moduleattrib.cc -D'ATTR(X)=[[X]]'
> Return: 0x00:0 Sun Sep 21 18:10:11 2025 EDT
> ```
Fixed.
https://github.com/llvm/llvm-project/pull/107168
More information about the cfe-commits
mailing list