aaron.ballman added inline comments. ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:37 @@ +36,3 @@ + q -= i; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not use pointer arithmetic + q -= ENUM_LITERAL; ---------------- I don't think this comment is "done" yet. I still don't know how this check is intended to handle code like that. Does it currently diagnose? Does it not diagnose? Should it diagnose?
================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:51 @@ +50,3 @@ + + i = p[1]; + // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: do not use pointer arithmetic ---------------- How well does this handle code like: ``` void f(int i[], size_t s) { i[s - 1] = 0; } ``` Does it diagnose, and should it? http://reviews.llvm.org/D13311 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits