aaron.ballman added inline comments.
================ Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:31 +void RedundantDataCallCheck::registerMatchers(MatchFinder *Finder) { + using namespace ast_matchers; + ---------------- No need to register any of these matchers unless in C++ mode. ================ Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:45 + anyOf(TypesMatcher, pointerType(pointee(TypesMatcher)))))), + callee(namedDecl(hasName("data")))) + .bind("call")))), ---------------- Eugene.Zelenko wrote: > aaron.ballman wrote: > > Should this check apply equally to `std::string::c_str()` as well as > > `std::string::data()`? > readability-redundant-string-cstr do both. Yup! But that makes me wonder if the name "redundant-data-call" is an issue. Perhaps the check name should focus more on the array subscript in the presence of an operator[]()? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45702 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits