[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)
commitd1abcf799ef589d567ed8501af499c99dfa7702a
tree76f5b03decf5268096ffb10b8822566221a03b37
parent7326c01aaad294075a81f752e924cb38a63b8fae
[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

llvm-svn: 261632
clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
clang/test/Analysis/PR24184.cpp
clang/test/Analysis/fields.c
clang/test/Analysis/ptr-arith.c
clang/test/Analysis/ptr-arith.cpp
clang/test/Analysis/rdar-6442306-1.m