]> granicus.if.org Git - clang/commit
[analyzer] Fix trackNullOrUndef when tracking args that have nil receivers.
authorJordan Rose <jordan_rose@apple.com>
Fri, 3 May 2013 05:47:24 +0000 (05:47 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 3 May 2013 05:47:24 +0000 (05:47 +0000)
commitdcd6224911e234ab3657b7d0b79a2add1ae4fdd8
tree25030f25ae409b5ae27f097d55834ec7e7eb2d09
parentbb09f7b1d9312471b701f2683a9d955b4e954630
[analyzer] Fix trackNullOrUndef when tracking args that have nil receivers.

There were actually two bugs here:
- if we decided to look for an interesting lvalue or call expression, we
  wouldn't go find its node if we also knew we were at a (different) call.
- if we looked through one message send with a  nil receiver, we thought we
  were still looking at an argument to the original call.

Put together, this kept us from being able to track the right values, which
means sub-par diagnostics and worse false-positive suppression.

Noticed by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/inlining/false-positive-suppression.m [new file with mode: 0644]
test/Analysis/inlining/path-notes.m