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

    <tr>
        <th>Summary</th>
        <td>
            Assertion failure with nested parameter packs and lambdas
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            crash-on-valid,
            lambda
      </td>
    </tr>

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

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

<pre>
    Another similar to https://github.com/llvm/llvm-project/issues/61460 (in fact the original internal reproduce tripped over both #61460 and this new bug - in that once #61460 was fixed, the original reproducer still crashed, so I had to reduce a new reproducer for this bug)
```
template <typename... Ts>
void f1(Ts... ts) {
  [&](auto... indexes) {
    ([&] {
 (ts);
        indexes;
      }, ...);
  };
}
void f2() { f1(); }
```
https://godbolt.org/z/6KW6jT1n7
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU1FvgzgM_jXmxSoCB2h54KFbr9LpXifdcyAuZEsTlIR2u19_Cty2bo-HkEjsz_5s81mGoEfL3EH9BPUpk0ucnO_UvTdSv2nOeqc-uqN1cWKPQV-1kR6jwynGOYA4Ap2BzqOO09Lng7sCnY25fX52s3evPESgsw5h4QB0bsqqKRDooC1e5BAxTozO61FbaVDbyD4dPM_eqWVgjF7PMyt0N_bYuzghkNiySKswTjqg5Tv2y4g71BbjJCM6O_A38C4DXvQ7K6Dnn4RfPB5D1Mbg4GWYNmBw-CdOUqWGPa_FyJXqIeji_FZCv4xALRQnKI7QFP-96zXydTYyMoJ4jh8zW3nlPM_xJYD4Y4PcnFZ4KYEOLyG5YgBqEfZPmxsx_SBqoD4BHeQSXQJpq_idfyMxDfcL_uABOqxpQTxg0_OZ56cd9qc0hDzPf8Yk--ctnR_qp8S8VbM1s0XiF-zXYH6pyKnemZg7PwKd_0la-evv5vWltPtMdUK1opUZd-W-LMu6FHWTTV3FqriwIqrLfd8osW_bvm32vegrWXMpMt1RQVUhiEhUbdnkkoiGqmASw6BUWUNV8FVqkyfBJu5slWp3aERTZkb2bMK6HkSDkXYEcbx4ZyNbBURAz8mRNLNzdneTRn-bjbz2SqZrfcp8t25Ev4wBqsLoEMM3ZdTRcHcMgX3ULi2GNotnvOs4oeUQWeEsvbxyZI-zHN7CKv6NIWSLN93_X8m11X8DAAD__zTNNtk">