]> granicus.if.org Git - clang/commit
[analyzer] Treat analyzer-synthesized function bodies like implicit bodies.
authorJordan Rose <jordan_rose@apple.com>
Fri, 24 May 2013 21:43:11 +0000 (21:43 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 24 May 2013 21:43:11 +0000 (21:43 +0000)
commitd474da062565596015558856333423199aed5eb1
treed0274263841e6f2ddb3d5e7b76ccdd25bbffeb02
parent5a6fb20841220488f8be7254fbea8ba7233ebcd3
[analyzer] Treat analyzer-synthesized function bodies like implicit bodies.

When generating path notes, implicit function bodies are shown at the call
site, so that, say, copying a POD type in C++ doesn't jump you to a header
file. This is especially important when the synthesized function itself
calls another function (or block), in which case we should try to jump the
user around as little as possible.

By checking whether a called function has a body in the AST, we can tell
if the analyzer synthesized the body, and if we should therefore collapse
the call down to the call site like a true implicitly-defined function.

<rdar://problem/13978414>

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