https://github.com/hubert-reinterpretcast commented:

Macro expansion is supposed to be allowed in a module directive.

```cpp
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
```


https://github.com/llvm/llvm-project/pull/107168
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to