[PATCH] D45117: [analyzer] Fix diagnostics in callees of interesting callees.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 30 17:56:57 PDT 2018


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet.
Herald added subscribers: cfe-commits, rnkovacs.

`removeUnneededCalls()` is responsible for removing path diagnostic pieces within functions that don't contain "interesting" events. It is the functionality that's controlled by the `-analyzer-config prune-paths and it makes bug reports much tidier (though sometimes it removes too much, and in this case it's great to disable this option when debugging).

While relatively simple, it contains a bug: when a stack frame is known to be interesting, the function doesn't descend into it to prune anything within it, even other callees that are totally boring.

This is rarely apparent, but in C++ there are a lot of implicit calls that suddenly become visible because of this bug.


Repository:
  rC Clang

https://reviews.llvm.org/D45117

Files:
  lib/StaticAnalyzer/Core/BugReporter.cpp
  test/Analysis/inlining/path-notes.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45117.140513.patch
Type: text/x-patch
Size: 16000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180331/ec433214/attachment.bin>


More information about the cfe-commits mailing list