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

    <tr>
        <th>Summary</th>
        <td>
            [warning] Don't report function returns address of local variable
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    * test: https://gcc.godbolt.org/z/Yz1dTvbhn
```

int *foo() {
    int *p = 0;
    {
        int x = 0;
        p = &x;
        *p = 42;
    }
    *p = 42;
    return p;
}
```

 - I already use -Wall to report all warning, but the **dangling pointer** is not identified by clang
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Uk9vnD4Q_TTDZbQrGNsBDhzIDyH97pWqHg024MqxkW022Xz6iv3XNE0RAs28N2884ydjNLPTugHxDKLL5JYWH5rTpKYpG7w6N0AtJh0TsBaXlNYIrAXqgfp5HI-zV4O36ejDDNS_A_U_3gv17TQsDvIO8hae8tt7DS9f4xICtZP3QBVQjVA-XxFExBu6IrAOc2AfoD94d-7bF8T9uQoAPb39BT3kOX3S7z4E_yAFnbbgcH0kH1VfDosH_B-lDVqqM25R4-G7tBaTx6BXHxLu0asMzrgZ6D8ctoRp0Xt7oFZJN1vjZly9cUmHaxZNROcTGqVdMpPRCoczjla6OVMNUzWrZaabomTEeCmYyJZmpIIzlte8qtlU6GlUgrQQJCVj9SB4ZhrKiRcFsbxklRDHigpdKS5HIlVxLoDn-kUae7T29LJfeWZi3HRTFCUnkVk5aBsvTiJy-hUvKBDtxgrNXnQYtjkCz62JKf6WSSbZiwXvaxAddt4Blem-pGlzYzLe3bYfUSoVdIzoJ7R-lBZPMhg5WJ1twTafnGrSsg3H0b8A9XvX2--wBv9Tjwmov5w1AvW3YU4N_QoAAP__-l_jXw">