]> granicus.if.org Git - clang/commit
[analyzer] Don't add arrow to the inlined function's decl when it has no body.
authorArtem Dergachev <artem.dergachev@gmail.com>
Mon, 5 Jun 2017 13:36:28 +0000 (13:36 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Mon, 5 Jun 2017 13:36:28 +0000 (13:36 +0000)
commita3d66c2d221d3eb97e380181a8c6071c07618798
tree649eab6fe7c19ec29bd651d5f6263c90e2f886b7
parentd6f929a22be467bf8cf89eafd5e022a081a45488
[analyzer] Don't add arrow to the inlined function's decl when it has no body.

In plist output mode with alternate path diagnostics, when entering a function,
we draw an arrow from the caller to the beginning of the callee's declaration.
Upon exiting, however, we draw the arrow from the last statement in the
callee function. The former makes little sense when the declaration is
not a definition, i.e. has no body, which may happen in case the body
is coming from a body farm, eg. Objective-C autosynthesized property accessor.

Differential Revision: https://reviews.llvm.org/D33671

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