]> granicus.if.org Git - clang/commit
[analyzer] Silently drop all reports within synthesized bodies.
authorJordan Rose <jordan_rose@apple.com>
Thu, 1 Aug 2013 22:16:30 +0000 (22:16 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 1 Aug 2013 22:16:30 +0000 (22:16 +0000)
commitcd007b18ba218925923a82ad4462fecf903f4a93
tree14153f15b8585aa02ea0f0b9c5abbb9614396795
parentab3ce592d027e3a10fb21e703cab1507f8d9bb03
[analyzer] Silently drop all reports within synthesized bodies.

Much of our diagnostic machinery is set up to assume that the report
end path location is valid. Moreover, the user may be quite confused
when something goes wrong in our BodyFarm-synthesized function bodies,
which may be simplified or modified from the real implementations.
Rather than try to make this all work somehow, just drop the report so
that we don't try to go on with an invalid source location.

Note that we still handle reports whose /paths/ go through invalid
locations, just not those that are reported in one.

We do have to be careful not to lose warnings because of this.
The impetus for this change was an autorelease being processed within
the synthesized body, and there may be other possible issues that are
worth reporting in some way. We'll take these as they come, however.

<rdar://problem/14611722>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187624 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporter.cpp
test/Analysis/inlining/path-notes.m