<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/105882>105882</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[C++20] [Modules] clang should find CNTTP type from partition even if not exported
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ldalessa
</td>
</tr>
</table>
<pre>
```c++
a.cpp
module mod:a;
struct A { consteval A(int) {} };
mod.cpp
export module mod;
import :a;
export template <A> struct B{};
main.cpp
import mod;
B<0> b; // CNTTP type A from mod:a is not exported, but should be found anyway
```
[godbolt](https://modules.godbolt.org/z/djE7fozdT)
* I have a module partition that defines a type, `A`, that is never exported.
* I have a type `B` that _is_ exported and depends on `A` in CNTTP.
* I have a client that imports the module, and instantiates `B` without explicitly naming `A`.
I believe that this should work. It _does_ work if `A` is not in a partition, and it works in gcc.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVMuO4zgM_BrmQowhy48kBx_iZAL0YRd76HtDtuhYs7JkWHR6M1-_8COPHjRgIBFEVhWLpFQI5uKICshKyE4bNXLrh8JqZSkEtam8vhWQi-WrQZbTJ04gDiqq-37523k9WsLOa0gOCpI1IvAw1owHhG2JtXeB6aosHkDujGOQ--kCtieE7emR9EB8wtN_vR8YX1nWYNPNN19Y12imrreKCSE5HiD5iauacuH8k08Z9yRcYV-ZSkiOYoKpICkR5BnkGY9_v7__g3zrCQ_YDL67W4AmoPOMixbSII9YjYyh9aPVWBE2fnQalbt9qtsq5O7yqy7IyovXlbcM2QnkrmXuAySHRcDiSIjWkMgPF5Dn3yDP-tfPbeN_63eQ-y948oBv2Korobob2quBDRvvkFvFqKkxjgKqubBJOeSLOnlcIqbi6ErDo7wIv0GfbYFclJCLJe_DhI9HDiqnUVNPTgf07k6Cxi22fotZW0OOVxVzkwJyS2slk8AJ1bjAyrFRTOGh4NNw68e5JdbUhu0NneqMu9yZo1ef3rAia-hKCxe3Jtyb9-mHfyN8Y_zQnsLHfEbTPAtYWm8cqqe1D2k8x4fp-lLX0UYXid4ne7WhIt7KNE2TfJdu2mIfVzrWW6ESkcR6p-p4X-3zvGkainWtaGMKKWQqdjKRQuxEGm1FtY_TJtMq1lmea0gFdcrYyNprN43GxoQwUhGLbLeTG6sqsmHeeylrq9wFpJyegKGYEn5U4yVAKqwJHJ4QbNjOj8VxeQqkgOyEkJV_LaM4nWawu1uNcfp1T-YteU4cXclN5r0uy2YcbPF10C-G27GKat-BPE9i1p8f_eB_Uc0gz3NxAeR5re9ayP8DAAD__xGZf5g">