[PATCH] D131623: [clang-tidy] Improve modernize-use-emplace check

Joey Watts via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 07:14:12 PDT 2022


joeywatts created this revision.
Herald added a subscriber: carlosgalvezp.
Herald added a project: All.
joeywatts updated this revision to Diff 451689.
joeywatts added a comment.
Eugene.Zelenko retitled this revision from "(wip) improve modernize-use-emplace check" to "[clang-tidy][wip] improve modernize-use-emplace check".
Eugene.Zelenko added reviewers: alexfh, aaron.ballman, njames93, LegalizeAdulthood, JonasToth.
Eugene.Zelenko added a project: clang-tools-extra.
Herald added a subscriber: xazax.hun.
joeywatts updated this revision to Diff 451842.
joeywatts retitled this revision from "[clang-tidy][wip] improve modernize-use-emplace check" to "[clang-tidy] Improve modernize-use-emplace check".
joeywatts edited the summary of this revision.
joeywatts updated this revision to Diff 451847.
joeywatts published this revision for review.
Herald added a subscriber: cfe-commits.

Update documentation


Eugene.Zelenko added a comment.

Please mention changes in Release Notes.


joeywatts added a comment.

Updated commit title/description.


joeywatts added a comment.

Add changes to release notes.


This patch improves the modernize-use-emplace check by adding support for
detecting inefficient invocations of the `push` and `push_front` methods on
STL-style containers and replacing them with their `emplace`-style equivalent.

Fixes #56996.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131623

Files:
  clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/modernize/use-emplace.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize/use-emplace.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131623.451847.patch
Type: text/x-patch
Size: 14160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220811/f03a84ac/attachment-0001.bin>


More information about the cfe-commits mailing list