<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/149008>149008</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C++][Module] Improve diagnostic 'export declaration can only be used within a module purview'
</td>
</tr>
<tr>
<th>Labels</th>
<td>
c++20,
clang:modules
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yronglin
</td>
</tr>
</table>
<pre>
```cpp
module M; // #M
export int b2; // expected-error {{export declaration can only be used within a module purview}}
```
As Michael's suggestion in https://github.com/llvm/llvm-project/pull/148861#discussion_r2208847734, This should say "within the purview of a module interface" for this case, or just "within a module interface" to be less pedantic.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykkkGL4zAMhX-NchFTXCVp0kMO7ZTCHnrb--LaauLBtYPldKb_fknanZnDXpYFgbGQPz0_nhZxfWDuoN5DfSj0lIeYunuKofcuFOdo7x1s1KPMOILaXaOdPOMJyj0CHYGOCFSeQO1A7fhjjCmjCxnP9G2CP0Y2me0LpxQTQrOHZv8ctmy8Tjq7GNDogDH4O54ZJ2GL7y4PLqDG59pxSjfH79Ac5lp2fup7XHeCJ2cGzR6oEZSp71kWuAs45DwKlLuHrN7lYTqvTLwCHb2__TlexhTf2GSg4zh5D3RcV227WQOV1omZRFwMvxKRatuqacoK6BV_Dk5Qhjh5i6LvCERP8Xn41I3x8vUXFzKnizYMRHiJCfOMMFp45sWEb5Pkb5y_P8xxNsuzCI5sdcjOrArblXZbbnXB3bqpaVNS3VAxdGuyrWkr2rSXsybT2pZLs62rxhJbVmXhOlJUq2a9UURU00qXtjbVprZ00UqZBirFV-38ajZqFVNfOJGJu3W1VaotvD6zlyVPRAZoD7QnBURAr3PH69BD-QyRzP36UKRucf089QKV8k6yfOGzy34J6OuDBvUB6v1pAUB9wB_XMcUbo3W6D1GyMwjU_E-2qCmm5Lt_zspihCxpWby4dfQ7AAD__95mE4A">