Issue |
144230
|
Summary |
Possibly inordinate visibility with C++ modules
|
Labels |
new issue
|
Assignees |
|
Reporter |
rohanlean
|
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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs