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

    <tr>
        <th>Summary</th>
        <td>
            [clang] False positive: -Wmissing-noreturn triggered on lambdas
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:diagnostics,
            false-positive
      </td>
    </tr>

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

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

<pre>
    Example:

```cpp
#include <stdexcept>

int main()
{
    auto l = []() {
        throw std::runtime_error{"Error."};
 };
}
```

https://godbolt.org/z/zdWdfMdxM

Expectation is to get no warning, since as a user I cannot add `[[noreturn]]` to the internal `operator()` of the lambda implementation.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxcUsGO2yAQ_Rp8GSUig3GSgw_ZTSL1sOc9VthMHCoMFoyz6X59RZzuVrWwPEaPN--9weTshkDUCv0i9LEyM19januTfMyD8Tf6nKou2t_t6W7GyZNQByEfq5HL6qep_KJyofezJRDqNbOle08TC3Va4C4wjMYFgTuB-7K3fRHyAABgZo7gQagjLCoWDHwjysPXFD8gsy0K1CHNgd1IPymlmAoS8VTKtUAU26NQj7NfVSn-0bxoujJPudDhWeB5iLaLntcxDQLPn-W17_byZu9vC_x0n6hnwy4GcBk4wkAMIcKHScGFQeArZBd6ApPBwJwpwQ_oTQiRwVgLpXEx-BJiIp5TKF71UTSykPGVwAWmFIwv0DhRMhzTM7FGQrw8QN6MnTXgyjhGCouidWVbZfdqbypqN1utm91Go66uba8bU0utaINGXrRGtTO7y072m0uzrdW2ci1K1HKHUu43u1qvG7TYyaa77Du5oW0takmjcX7t_W0s-VQu55naja7rvaq86cjnxw1C7L0Jg1AH68wQYmbX5zIRfBWIF-MzraaYHbsblW19rFJbWFfdPGRRS-8y5-8-7Ng_7uZCq49wLhzwxaEOsHofXc4uDKu_sQInNwyUyEIMz7hyNSff_jdxx9e5W_dxFHguPZ-f1ZTiL-pZ4PlhNAs8P73eWvwTAAD__0mR-1U">