summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-02-27 18:49:57 +0000
committerJordan Rose <jordan_rose@apple.com>2013-02-27 18:49:57 +0000
commitf7f32d52021170052d881dd0efee3f0db1ab6801 (patch)
tree6135ab7e2ddef3d653ea8b3305b103a8f3a39a6a /lldb/source/Core/Module.cpp
parent4587b287582b581a79deb74f926aaa44272165b6 (diff)
downloadbcm5719-llvm-f7f32d52021170052d881dd0efee3f0db1ab6801.tar.gz
bcm5719-llvm-f7f32d52021170052d881dd0efee3f0db1ab6801.zip
[analyzer] Teach FindLastStoreBRVisitor to understand stores of the same value.
Consider this case: int *p = 0; p = getPointerThatMayBeNull(); *p = 1; If we inline 'getPointerThatMayBeNull', we might know that the value of 'p' is NULL, and thus emit a null pointer dereference report. However, we usually want to suppress such warnings as error paths, and we do so by using FindLastStoreBRVisitor to see where the NULL came from. In this case, though, because 'p' was NULL both before and after the assignment, the visitor would decide that the "last store" was the initialization, not the re-assignment. This commit changes FindLastStoreBRVisitor to consider all PostStore nodes that assign to this region. This still won't catches changes made directly by checkers if they re-assign the same value, but it does handle the common case in user-written code and will trigger ReturnVisitor's suppression machinery as expected. <rdar://problem/13299738> llvm-svn: 176201
Diffstat (limited to 'lldb/source/Core/Module.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud