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

    <tr>
        <th>Summary</th>
        <td>
            clang analyzer: False positive NewDeleteLeaks for QObject related object creation
        </td>
    </tr>

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

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

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

<pre>
    See [Object Trees & Owership](https://doc.qt.io/qt-5/objecttrees.html), for example, the following code generates a false `clang-analyzer-cplusplus.NewDeleteLeaks`
``` c++
class Foo : public QObject {
public:
    Foo(QObject* parent) : QObject(parent) {
        QObject* bar = new QObject(this);
    }
};
```
Is it anyway to suppress this false report? Or how can I modify the mallocchecker to temporary disable this.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxVUtuOmzAQ_RrzMgpiTSDwwMNuI6SVqkZV-wPGDOCuwaxtlqRf38FJtllk5Ln4nLk2pr1UvxCBZS-n5g9KD78togPGczitaN2gZpYdGS8G72fH0mfGazqtkfG7j5Uh-d3vMrpMwPsNHg9-1IyXjH-DzljAsxhnjZvqByST1mZVUw_StAg9TmiFp6gCOqEdZZMnUoup34lJ6MtftDs568Vtf_wD1yNq9PgdxZujlyw5suR5E8IByfjLdoKZaJyD2hig1GFeGq0k_LyVyg63V1f7VlxQgT6CUNG3l4wTVlicSCoD06ejeLDf6eD2PaAbYQl3hAnXB6wflNvalD4A2eF4q4iEu-Ozuqv66kB5ENNlFRfwBtwyzxap0I3w1kOLs7GepTWcLAxmBSkmeIXRtKq7hDGMgsYg5YDyDe1G43EkjLAXaJUTjcbAF19jRm2VtmVaisgrr7EKA4L7gLae1CHubJzy6gPh66DCHtwbb1HTvFu4rgxIi8IrM0WL1dXXPeuVH5YmlmYkReuP-7Wbrbk2sVbOLUhtrLOcPyXRUPEUsy4_8LwounLfPqWcy_ZQ5Ps2zwp5aCItGtSuop1nnG8TCRQk06ZHquIJ50nOs6TcZ_wpLg5llokM0xQ72Sac7RMchdLxlkdsbB_ZKqTULL0jp1bOu_9O2j_VT4ghHPGLxQ_GVl6N53MUAlch8X-ReB4X">