<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>A lot of them are cases where a function returns a Foo*, but the fact that it's an <i>owned</i> Foo* is only in the documentation (or not written anywhere outside the .cpp file!). A few more have been cases where containers of Foo* get erased instead of deleted.</div><div><br></div><div>A "migration" warning/checker could complain about returning an owned pointer as a bare Foo* instead of as a std::unique_ptr (or llvm::IntrusiveRefCntPtr or similar).</div><div><br></div><div>The other problem is that the NewDeleteLeaks checker is currently still marked alpha, because we have a number of patterns that make it difficult to use (mainly constructors that escape 'this'). We could add a new annotation to signal this case, but I've kind of been leery of more annotations until the analyzer_annotate attribute gets implemented (see <a href="http://clang-analyzer.llvm.org/open_projects.html">http://clang-analyzer.llvm.org/open_projects.html</a>).</div><div><br></div><div>Jordan</div><div><br></div><br><div><div>On Apr 23, 2014, at 22:43 , Daniel Marjamäki <<a href="mailto:Daniel.Marjamaki@evidente.se">Daniel.Marjamaki@evidente.se</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>Hello!<br><br>It is great that these leaks have been discovered!<br><br>As far as I see no tickets has been created in bugzilla that says that the static analyser should detect any of these.<br><br>Has anybody reviewed the leaks to see if any of them could be detected by static analysis?<br><br>Best regards,<br>Daniel Marjamäki<br><br>..................................................................................................................<br>Daniel Marjamäki Senior Engineer<br>Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden<br><br>Mobile:                 +46 (0)709 12 42 62<br>E-mail:                 <a href="mailto:Daniel.Marjamaki@evidente.se">Daniel.Marjamaki@evidente.se</a><br><br><a href="http://www.evidente.se">www.evidente.se</a><br><br>_______________________________________________<br>cfe-dev mailing list<br>cfe-dev@cs.uiuc.edu<br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>