]> granicus.if.org Git - clang/commit
[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)
commit7be2245487f9cd7d04f013db92280d9ccd323586
tree90bf026e53f49203ff9ffde5dc4db06745b6b074
parent3ea09a802f973c2726b2a489ae08a4bded93410b
[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>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179351 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
test/Analysis/diagnostics/undef-value-param.c
test/Analysis/diagnostics/undef-value-param.m
test/Analysis/inline-plist.c
test/Analysis/inlining/eager-reclamation-path-notes.cpp
test/Analysis/inlining/path-notes.c
test/Analysis/inlining/path-notes.cpp
test/Analysis/inlining/path-notes.m
test/Analysis/malloc-plist.c
test/Analysis/retain-release-path-notes.m