The diagnostic was confusing and reporting that an array contains far
more elements than it is defined to have, due to casting.
For example, this code:
double foo[4096];
((char*)foo)[sizeof(foo)];
warns that the "index 32768 is past the end of the array (which contains
32768 elements)."
Reviewed By: serge-sans-paille, aaron.ballman
Differential Revision: https://reviews.llvm.org/D135920
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).
llvm-svn: 136046