]> granicus.if.org Git - clang/commit
Expand array bounds checking to work in the presence of unary & and *,
authorKaelyn Uhrain <rikka@google.com>
Tue, 26 Jul 2011 01:52:28 +0000 (01:52 +0000)
committerKaelyn Uhrain <rikka@google.com>
Tue, 26 Jul 2011 01:52:28 +0000 (01:52 +0000)
commitb48f7c059e74cd5395ca542c1a96be16e42f3d80
treec6a4be10536c68776950b413598eb15527ce0b35
parentccb21e4f2b2a705dce4f2d82e615dce5aa6cdedb
Expand array bounds checking to work in the presence of unary & and *,
and to work with pointer arithmetic in addition to array indexing.

The new pointer arithmetic porition of the array bounds checking can be
turned on by -Warray-bounds-pointer-arithmetic (and is off by default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136046 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaChecking.cpp
lib/Sema/SemaExpr.cpp
test/SemaCXX/array-bounds-ptr-arith.cpp [new file with mode: 0644]
test/SemaCXX/array-bounds.cpp