<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62043>62043</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"inline function not defined" when compiling as a module
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tchaikov
</td>
</tr>
</table>
<pre>
a minimal reproducer looks like:
```c++
module;
export module foo;
template<typename T>
inline void func(T) noexcept;
template<>
inline void func<unsigned>(unsigned) noexcept
{}
```
the compile options are `-std=c++20 -Wall -Wextra`. tested with clang-16 and clang trunk at the time of writing. both of them emit error like:
```
<source>:6:13: error: inline function not defined
inline void func(T) noexcept;
^
1 error generated.
```
this source file compiles fine if module related statements are removed:
```c+
template<typename T>
inline void func(T) noexcept;
template<>
inline void func<unsigned>(unsigned) noexcept
{}
```
also, both source files (with module and without module) compile fine with GCC, and `-std=c++20 -Wall -Wextra -fmodules-ts` options.
see https://godbolt.org/z/ehEGhMTcr
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVE2PpDYQ_TXmUgIZm2aaA4eZnu095TbSng0U4LSxkV10z-bXRwY66bS0E-UYZAF2levjvWerEPRgEWt2eGOH90QtNDpfUzsqfXHXpHHdz1rBpK2elAGPs3fd0qIH49wlgNEXZPKV8XfG7--Sb6Nl4i2OdXVy3WKQybdHV_ycnSfYbNA792QnnGajCJk80c8ZrZoQPpj8tlm1NdoiXJ3uoF9sy8Txg4kKrMPPFmf6dbBfh5Cnxa6IdNFHHP-aPcbdgr68sZf3p5b_kW9EaN00a4PgZtLOBlAegZU8DdQx-b4DJDikP5QxkP7AT_KKlTwDwkDYwU3TCK1RdkjzEpTttgmQX-wFFEHMQnpCcD3cvCZthwwaR2NcoBEnwEkToPfOP7H1VLQ8Bbf4FmPj8rVk8jWXTL5uW-PPDlbEKXYD1hF02OsIz38jBB4edti5yPciB7ToFWGXfQmuDrDVC31EeEc6QKwHdH8XlcfIeQeBFOGEljYSPE7uGkn-Qrr_fwkqExwTp00PD2gFYOK4SmtHKQorzt1yP40x2129K6Sr-_fTKcaL7v8qY0j7LVRIKbCS3w9B9lhhQISRaA6RCXFm4jy4rnGGMucHJs5_MHHG8dv38beP1iddLbtKVirBOi-PeZ6_FEImYy2xbIoqL4qDynvEQ1HwvClbWVa8PB6qMtG14ELyIue84rKQmeq5FFIp5F3VV0XPCo6T0iYz5jrF3IkOYcG6FLyQiVENmrDekUJYvMFqZELEK9PXcU_aLENgBTc6UPg7CmkyWDMhvjo8QsBtRLvjre0AKoDaiUgWb-oniDSNS5O1bmLiHFPtn3T27ndsiYnzWmBg4rw28GcAAAD__y360JA">