]> granicus.if.org Git - clang/commit
[analyzer; new edges] Properly set location after exiting an inlined call.
authorJordan Rose <jordan_rose@apple.com>
Fri, 24 May 2013 21:43:05 +0000 (21:43 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 24 May 2013 21:43:05 +0000 (21:43 +0000)
commit5a6fb20841220488f8be7254fbea8ba7233ebcd3
tree6daa7dc6e42d08a67c0c88098541f483c61741bb
parent9779fdd271bb6a938bdee93f901e4ef7b1a88610
[analyzer; new edges] Properly set location after exiting an inlined call.

The new edge algorithm would keep track of the previous location in each
location context, so that it could draw arrows coming in and out of each
inlined call. However, it tried to access the location of the call before
it was actually set (at the CallEnter node). This only affected
unterminated calls at the end of a path; calls with visible exit nodes
already had a valid location.

This patch ditches the location context map, since we're processing the
nodes in order anyway, and just unconditionally updates the PrevLoc
variable after popping out of an inlined call.

<rdar://problem/13983470>

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