Index: clang-tidy/modernize/UseEmplaceCheck.cpp =================================================================== --- clang-tidy/modernize/UseEmplaceCheck.cpp +++ clang-tidy/modernize/UseEmplaceCheck.cpp @@ -54,16 +54,16 @@ const auto *PushBackExpr = Result.Nodes.getNodeAs("push_back"); const auto *InnerCtorCall = Result.Nodes.getNodeAs("ctor"); - auto functionNameSourceRange = CharSourceRange::getCharRange( + auto FunctionNameSourceRange = CharSourceRange::getCharRange( PushBackExpr->getExprLoc(), Call->getArg(0)->getExprLoc()); auto Diag = diag(PushBackExpr->getExprLoc(), "use emplace_back instead of push_back"); - if (functionNameSourceRange.getBegin().isMacroID()) + if (FunctionNameSourceRange.getBegin().isMacroID()) return; - Diag << FixItHint::CreateReplacement(functionNameSourceRange, + Diag << FixItHint::CreateReplacement(FunctionNameSourceRange, "emplace_back("); auto CallParensRange = InnerCtorCall->getParenOrBraceRange(); Index: docs/ReleaseNotes.rst =================================================================== --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -209,7 +209,7 @@ - New `modernize-use-emplace `_ check - Finds calls that could be change to emplace. + Finds calls that could be changed to emplace. - New `performance-faster-string-find `_ check Index: docs/clang-tidy/checks/modernize-use-emplace.rst =================================================================== --- docs/clang-tidy/checks/modernize-use-emplace.rst +++ docs/clang-tidy/checks/modernize-use-emplace.rst @@ -3,9 +3,8 @@ modernize-use-emplace ===================== -This check would look for cases when inserting new element into an STL -container, but the element is constructed temporarily or is constructed just -to be moved. It would also work with std::pair. +This check look for cases when inserting new element into an STL +container, but the element is constructed temporarily. Before: