]> granicus.if.org Git - clang/commit
[analyzer] Use a more generic MemRegion.getAsOffset to evaluate bin operators on...
authorAnna Zaks <ganna@apple.com>
Tue, 28 May 2013 17:31:43 +0000 (17:31 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 28 May 2013 17:31:43 +0000 (17:31 +0000)
commit4e9179a3d0ec612a4d540281020b200254348a6b
treea87353d356e19fc93e1c1de2a78a2ebff81eadb6
parent3ff4a2fea4aa6e5182b7799ccb4352e56961a212
[analyzer] Use a more generic MemRegion.getAsOffset to evaluate bin operators on MemRegions

In addition to enabling more code reuse, this suppresses some false positives by allowing us to
compare an element region to its base. See the ptr-arith.cpp test cases for an example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182780 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/ptr-arith.c
test/Analysis/ptr-arith.cpp [new file with mode: 0644]