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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Assertion "The current call operator must be synchronized with Sema's CurContext" hit when using nested lambdas in a template
        </td>
    </tr>

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

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

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

<pre>
    The following code hits an assert - "The current call operator must be synchronized with Sema's CurContext".

https://godbolt.org/z/PczYKbMeo

```
template <int a> class n {};
template <int Args>
void testRange() {
 constexpr int c = 1;
  []() {
         [](n<c> id) { };
 };
}
```

This might be a duplicate of https://github.com/llvm/llvm-project/issues/47400
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysU8Fu2zAM_Rr6QjSQZSeuDz6kSX0ZBgxbLzvKEm1rkKVAlJs2Xz_Yabtu62mYYcgiyEc_ko-K2Q6eqIHtHWyPmZrTGGJDzl5UR2lU3kQ6c9YF89w8jIR9cC6crR9QB0M42sSoPCpmiglvEKRcwvQcI_mEWjmH4URRpRBxmjlhR8jPXo8xeHshg2ebRvxGkwJZMR7meAg-0VMCKTcgjiD213NM6cRQ7EG2INshmC64tAlxANleQLZf9OX7p-4zhfcg2ImXdzUTTSenEiEUB-sTKijuUTvFjB6huoPqCMXdx7H7ODAU91fnY7AGE3H6qvxAIG9B1muC1Ys6eE70dIq4IDVCccT8LTPitdt_wV6fN7eH4qAXjta8ROJ7ir8Zy_2jmq_nw2gZJzuM6wAUmvnkrF7KCz3-0Vqbxrnb6DCBbJ17fP3cnGL4QTqBbC3zTAyyLatSiMw0hamLWmXU5FVe7qpqJ8tsbG7rbtcbY2ReSrFVeVFsu35HeVULTb3aZbaRQpZiK2ReL7eNKIqyryttTF73nTJQCpqUdZuFwDLsbP11U4vbepc51ZHjVbtSaqf8AFIuMo7NSribB4ZSOMuJf2VINrlV8IcVsT3iflWvDf7_ynfZDjyP5HHmZWM8cSKDTk2dUYzWo8JXlWVzdM2_z2Htx88AAAD__9G3Kto">