<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/144230>144230</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Possibly inordinate visibility with C++ modules
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
rohanlean
</td>
</tr>
</table>
<pre>
The following is accepted by clang version 20.1.6:
```
//--- A.cppm
export module A;
export using T = int;
//--- M.cppm
export module M;
import A;
//--- M.cpp
module M;
T x;
```
This is rejected:
```
//--- A.cppm
export module A;
export using T = int;
//--- P.cppm
export module M:P;
import A;
//--- M.cppm
export module M;
export import :P;
//--- M.cpp
module M;
T x;
```
But this is again accepted:
```
//--- A.cppm
export module A;
export using T = int;
//--- P.cppm
module M:P;
import A;
//--- M.cppm
export module M;
import :P;
//--- M.cpp
module M;
T x;
```
I think the relevant paragraphs are [basic.lookup.general]//p2,3 and that the correct behaviour is to reject in all cases.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8lMFq4zAQhp9Gvgwxsmwn9cEHpyWwh0IPeYGxNLVnq0hGktPm7RenZruFDSxsKRhsRp5_5v80DMbIgyNqRb0X9UOGcxp9aIMf0VlCl_XeXNrjSPDsrfWv7AbgCKg1TYkM9BfQFt0AZwqRvQMl8yLfirITshNbuT6yE-og1GGz2UCX62k6CdnR2-RDgpM3syXoRLn_CM5xqXQEUT4Au_R-9knm8e8yj--_8uka7G4lCtl9ThCyO8Lb-v1H38eR4-I40E_Sicw3OHu66ax7-jd3N7GswTX_Q_A_AO3nBGmFhAOy-z0c34nqCxl9JZwfCxr3AmkkCGTpjC7BhAGHgNMYAQOBqPc9Rta59f5lnvKBHAW0on54rzopoe5LQGcgjZiuWtqHQDpBTyOe2c9hoZ_8OqWwXIK1oDFSzDPTlqYpG8yoLXZV0xS7YqeyscWqaipzVzXUmGdTKDJ1sW3uTEW6LosdZtwqqWq5LapiK7eFzPtiJ3Xfl5p2EsuqEZWkE7LNrT2fch-GjGOcqS2qSpUys9iTjdfVopSjV7ieCqWWTRPaJWnTz0MUlbQcU_yQSZwstU8-Ru7tBdj5YNhhIjhz5J4tpwu8chrhXqi9UPv1DmM2B9uOKU1xmb4rv4HTOPe59iehDkuF9bWZgl9oCXW49hWFOqyNn1v1KwAA__-Pl4St">