aaron.ballman added a comment. Some minor formatting nits, but otherwise LGTM. You should run the patch through clang-format: https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting
================ Comment at: clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp:29 hasOperatorName("+="), hasOperatorName("-=")), - hasType(pointerType()), + anyOf(hasType(pointerType()), hasType(autoType(hasDeducedType(pointerType())))), unless(hasLHS(ignoringImpCasts(declRefExpr(to(isImplicit())))))) ---------------- This extends past the 80-col limit. ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:12 +int* pointer() { + return nullptr; ---------------- Should be `int *` instead of `int*` (elsewhere as well). ================ Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp:26 + auto x = (int*) nullptr; + p = x + 1; + // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: do not use pointer arithmetic ---------------- Can you remove the whitespace alignment from the new tests? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits