aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
There are a few small nits I've mentioned, but otherwise LGTM. ================ Comment at: clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp:34-35 + + const auto first = hasArgument(0, expr().bind("one")); + const auto second = hasArgument(1, expr().bind("two")); + const auto third = hasArgument(2, expr().bind("three")); ---------------- No need to bind either of these -- the bound name never gets used. ================ Comment at: clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp:36 + const auto second = hasArgument(1, expr().bind("two")); + const auto third = hasArgument(2, expr().bind("three")); + Finder->addMatcher( ---------------- Can likely pick a better name to bind than "three". ;-) I would recommend "RandomFunc" since that's what the parameter represents. ================ Comment at: clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp:70 + if (MatchedCallExpr->getNumArgs() == 3) { + auto DiagL = diag(MatchedCallExpr->getLocStart(), "'std::random_shuffle' has been removed in C++17; use 'std::shuffle' and an alternative random mechanism instead"); + DiagL << FixItHint::CreateReplacement( ---------------- Wrap for 80-column (here and elsewhere). https://reviews.llvm.org/D30158 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits