<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60405>60405</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] Failed to export declarations within language linkage
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ChuanqiXu9
      </td>
    </tr>
</table>

<pre>
    Here is the reproducer:

```
//--- M.cppm
export module M;
export extern "C++" foo() {}

//--- Use.cpp
import M;
int Use() { foo() }
```

The above reproducer is expected to be accepted but clang rejects it since clang feel all the things in global module is invisible outside the module unit. But this is not correct.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUs2O3CwQfBp8aY2FwYzHBx--2dHou-wtkXLFuMfuBIPDz2bz9hGe2d2sFAlhdZmuporSMdLsEAemzkxdKp3T4sPwtGTtftK33Fejn34P_2NAoAhpQQi4BT9lg4HJ_xi_MP62H_lj3UtxZeJ6OBzguTbbtt5RfN18SLD6KVuEZybPn3B8TRgcMCGemDjvS8DNeyZOTPTAujPrLp-Gvk_5GrHMucO07nQf_ORSOfHB84n18m8F-_5lQdCjf_lbefECXzc0CSdIHkYEbQxupRxzAmO1myHgdzQpAiWI5Aw-4BuiBW3t7mZayM0RyMFs_ajtmzNUsBeKNFoEn1OkCfeGx__sKNVwzqkwxHLc-QTGh4Am1dU0yKmXva5waI6datpeNrxaBj5NN0TecaFN2x_bG44nPLW9MaLpG2kqGgQXkjey4V2jeF8rqVQrlZayU-NJd6zluGqytbUva-3DXFGMGYcjb7mqrB7Rxj1NQpj7EwrOhCjhCkPpOYx5jqzllmKKHyyJkt1j-PTepS7A1Pl5FxxLddVk74Y_4jKhsTroRN5F-EXFTCgeZz0jWHI_9IxVDnZYUtpiyesel5nSksfa-JWJa7nB43PYgi9PxsR1FxWZuO66_gQAAP__plH4Fg">