[clang][Sema] Use correct array size for diagnostic
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
Loading
Please sign in to comment