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

    <tr>
        <th>Summary</th>
        <td>
            clang does not warn about uninitialized reads in lambdas
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            clang:diagnostics
      </td>
    </tr>

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

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

<pre>
    This warns (as it should):

```
$ cat test.cc
struct S {};

void g() {
  S s1 = s1;
}
```

This doesn't (but should, too):

```
$ cat test.cc
struct S {};

void g() {
  S s2 = [&]() { return s2; }();
}
```

```
$ out/gn/bin/clang -c test.cc
# No diag
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0ksGO4ywMx5_GuVhTEdM0yYFDO1GP32W-FyBAE1YURjHMavfpV2QqTTWHva1kweFv7J__WDP7JTqnoLtANzW65DVtKnqTmjnZX-r_1TP-1FtkBBo0o8_IayrBAo0gzyD2OIlHiDPQEY3OmB3ngzEgzpy3YjK-IfQX6CeQl89XH8lbXIAGoHHXxBnxDblFkBNy-0jsp-8dxHnHsslxBOpzRZvLF9gr5pT-HR_tfNUxOkE3fSXg5nLZIjKBvGAttUt_meM7WCoZ6LpEoOvs62mCjgu-mCdcIIn_JbReL88VGqukHeWoG6fa_ijE0LY0NqvqpXA3a3s5D2ZuZX-SwpzmVugjHUcxyMYrEtQJItGOHYnxMJ5ubStuVlrdDWIQcBTurn04hPBxP6RtaTxzcaqlQXRDE_TsAu8rRLQDgzzfthSzixaIgF6fhModE2dvuGrd1Gyq1n2Zy8JwFMFz5q9O2efg1KcN9cMxprwvJOo5lYwl-uiz18H_dhY3py2jjxj0fbaam7IFteb8znUX6FrN9Xkt88GkO9C1tnlcL-9b-uFM9X-fjoGujwE_FP0JAAD__yeu5dg">