Peter,

Some of the false positives can be suppressed by teaching the analyzer
about the codebase. For example, many of them are due to the custom
assertion/error handlers, where you stop execution on an error path by
calling, for example, 'elog'. You can drastically reduce the number of
false positives by annotating these few functions as 'noreturn'. See
"Custom Assertion Handlers" in
http://clang-analyzer.llvm.org/annotations.html.

If you run into other false positives please feel free to file bugs
against the analyser or ask questions on clang-dev mailing list
(http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev).

Cheers,
Anna.

On Fri, Jun 1, 2012 at 4:02 AM, Peter Geoghegan <pe...@2ndquadrant.com> wrote:
> On 1 June 2012 06:06, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> There were no html reports attached, and I'd prefer plain text
>> anyway please ...
>
> I saw a number of false positives when I ran the Clang static analyser
> a few months ago. As I recall, I could see why the tool concluded that
> certain lines of code may have contained errors, even though it was
> evident to me that they actually did not. That said, it probably
> wouldn't hurt to give it another try sometime soon.
>
> --
> Peter Geoghegan       http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training and Services

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to