njames93 added a comment. Just a general drive by comment here and doesn't affect this patch. This specifying containers logic is a little verbose, There may be a case to deprecate most of these options and just detect containers with an equivalent emplace* method at runtime.
================ Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:296-310 + auto Diag = [&]() { + if (PushBackCall) { + return diag(Call->getExprLoc(), "use emplace_back instead of push_back"); + } + if (PushCall) { + return diag(Call->getExprLoc(), "use emplace instead of push"); + } ---------------- ================ Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:320 } + if (PushCall) { + const char *EmplacePrefix = MakeCall ? "emplace" : "emplace("; ---------------- ================ Comment at: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp:325 + } + if (PushFrontCall) { + const char *EmplacePrefix = MakeCall ? "emplace_front" : "emplace_front("; ---------------- Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131623/new/ https://reviews.llvm.org/D131623 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits