]> granicus.if.org Git - clang/commit
[analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic
authorAnna Zaks <ganna@apple.com>
Sat, 20 Apr 2013 01:15:42 +0000 (01:15 +0000)
committerAnna Zaks <ganna@apple.com>
Sat, 20 Apr 2013 01:15:42 +0000 (01:15 +0000)
commit8ef064d53fb33b5a8f8743bcbb0a2fd5c3e97be1
tree48d560513b8708f42beee4795eb0545da1bcb5a3
parent716859df842e5a56e816d820d8326ead152dd9e4
[analyzer] Ensure BugReporterTracking works on regions with pointer arithmetic

Introduce a new helper function, which computes the first symbolic region in
the base region chain. The corresponding symbol has been used for assuming that
a pointer is null. Now, it will also be used for checking if it is null.

This ensures that we are tracking a null pointer correctly in the BugReporter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179916 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
lib/StaticAnalyzer/Core/MemRegion.cpp
lib/StaticAnalyzer/Core/ProgramState.cpp
lib/StaticAnalyzer/Core/SVals.cpp
lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
test/Analysis/inlining/inline-defensive-checks.c