[analyzer] Show "Returning from ..." note at caller's depth, not callee's.
authorJordan Rose <jordan_rose@apple.com>
Fri, 12 Apr 2013 00:44:17 +0000 (00:44 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 12 Apr 2013 00:44:17 +0000 (00:44 +0000)
commit526d93c55de364e5b457cbcd024f0cb7b47a6315
tree0a055f4375db531e3afa1ef67040de05831ee292
parentce781ae6ae6a403930cdc67c90e13d11af6764a4
[analyzer] Show "Returning from ..." note at caller's depth, not callee's.

Before:
  1. Calling 'foo'
    2. Doing something interesting
    3. Returning from 'foo'
  4. Some kind of error here

After:
  1. Calling 'foo'
    2. Doing something interesting
  3. Returning from 'foo'
  4. Some kind of error here

The location of the note is already in the caller, not the callee, so this
just brings the "depth" attribute in line with that.

This only affects plist diagnostic consumers (i.e. Xcode). It's necessary
for Xcode to associate the control flow arrows with the right stack frame.

<rdar://problem/13634363>

llvm-svn: 179351
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
clang/test/Analysis/diagnostics/undef-value-param.c
clang/test/Analysis/diagnostics/undef-value-param.m
clang/test/Analysis/inline-plist.c
clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp
clang/test/Analysis/inlining/path-notes.c
clang/test/Analysis/inlining/path-notes.cpp
clang/test/Analysis/inlining/path-notes.m
clang/test/Analysis/malloc-plist.c
clang/test/Analysis/retain-release-path-notes.m