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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to