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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Crash instantiating a lambda annotated with `annotate_type`
        </td>
    </tr>

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

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

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

<pre>
    This crashes when we try to instantiate the lambda:
```c++
template <typename T>
void h() {
  (void) [] (T) [[clang::annotate_type("foo")]] { };
}

void f() {
 h<int>();
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUsGu2yAQ_Jr1BSXCi4ntgw8vcfMDzb0CQwwVhsjgRPn7CsdpWrUSkvGsdmeHGRGjHb3WHfAjIH638yys0oAIvC_EkkyYuzdayKCe3cXYSIZZRKMjeRjtyUOTND9JCsT6mIRPViRNktHEiUkqAewLaA_0Cw70dQbAYz4rmvR0c7kD2Ck9b9qLSZMLsG-v8j1YRQxgA9gSqLcmQgCbXFpRfgTeZ-Ty-_c4OOHHTM2-hPchiaR_5PHrJLyGkEViC7xfe-sjgboHts3P99fls8T1nyUMsJP1Ke-6lv7T_pZcqI6plrWi0F1Zl5TV2DJemO7A5JU1TEgUQleK0kZWQ1OWJW2uqEtV2A4pVpSVDBnjjO9rWWFTtVVFB6mkbqCiehLW7Z27T_swj4WNcdFdw0teFU5I7eJm8PtRrnPwSXu1vsEpF7Khu-B3d-HsB94MfMVh7jLBTi5jhIo6G1P8UCab3Bqj00rBe3LKI_-IhPUjEVskyNsSRR42GQIH-rdJB1oss-tMSreYTcQz4Hm0ySxyP4QJ8JyZt8_uNoefekiA51V5BDyv4n8FAAD__x0Y2Ds">