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

    <tr>
        <th>Summary</th>
        <td>
            clang recursive module tuple failure
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    [files.tar.gz](https://github.com/user-attachments/files/16060923/files.tar.gz)

I am unable to compile the attached files using CMake and Ninja. Here is the error(s) I get:

```
again/main.cpp:7:11: error: no matching function for call to 'get'
    7 |     auto [a, s] = again.next("something");
      |           ^
again/main.cpp:7:11: note: in implicit initialization of binding declaration 'a'
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_pair.h:855:5: note: candidate template ignored: could not match 'pair' against 'tuple'
 855 |     get(pair<_Tp1, _Tp2>& __in) noexcept
      | ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_pair.h:860:5: note: candidate template ignored: could not match 'pair' against 'tuple'
 860 |     get(pair<_Tp1, _Tp2>&& __in) noexcept
      | ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_pair.h:865:5: note: candidate template ignored: could not match 'pair' against 'tuple'
 865 |     get(const pair<_Tp1, _Tp2>& __in) noexcept
      | ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_pair.h:870:5: note: candidate template ignored: could not match 'pair' against 'tuple'
 870 |     get(const pair<_Tp1, _Tp2>&& __in) noexcept
      | ^
...
```

The code has no issues compiling if I change tuple -> pair, but that shouldn't be an issue. The same code compiles without any errors if I change again.cxx from module syntax to a header file (and change the CMakeFile and main import to correspond). This indicates to me there is a bug with the module compilation.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVk2PqzYU_TU3m6sg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