aaron.ballman added a reviewer: rsmith. aaron.ballman added inline comments.
================ Comment at: lib/Sema/SemaChecking.cpp:11284 + case Stmt::MemberExprClass: { + const MemberExpr *ME = cast<MemberExpr>(expr); + expr = ME->getBase(); ---------------- Can use `const auto *` here instead of spelling the type out twice. Alternatively, you could skip the local variable entirely if you want. ================ Comment at: test/SemaCXX/array-bounds.cpp:275 +int test_multiarray() { + return multi[2][0][0]; // expected-warning {{array index 2 is past the end of the array (which contains 2 elements)}} +} ---------------- Can you also add tests for `multi[0][2][0]` and `multi[0][0][2]` to more clearly demonstrate that all levels of array indexing are checked? Repository: rC Clang https://reviews.llvm.org/D45865 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits