]> granicus.if.org Git - clang/commit
[analyzer] Improve pointer arithmetic checker.
authorGabor Horvath <xazax.hun@gmail.com>
Tue, 23 Feb 2016 12:34:39 +0000 (12:34 +0000)
committerGabor Horvath <xazax.hun@gmail.com>
Tue, 23 Feb 2016 12:34:39 +0000 (12:34 +0000)
commite17e2519c1697b449e3e2c7b4746bc0f786505ca
tree16e4ca5de50c5125ed72fae4d68fd5ce17f9a5bf
parent2b6cc0234bbd9ab5333e22d833e6a5981972acfc
[analyzer] Improve pointer arithmetic checker.

This patch is intended to improve pointer arithmetic checker.
From now on it only warns when the pointer arithmetic is likely to cause an
error. For example when the pointer points to a single object, or an array of
derived types.

Differential Revision: http://reviews.llvm.org/D14203

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261632 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
test/Analysis/PR24184.cpp
test/Analysis/fields.c
test/Analysis/ptr-arith.c
test/Analysis/ptr-arith.cpp
test/Analysis/rdar-6442306-1.m