[PATCH] D55044: [cfe-dev] clang-tidy check for Abseil make_unique
Andy Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 28 20:15:09 PST 2018
axzhang created this revision.
axzhang added reviewers: klimek, EricWF.
axzhang added a project: clang-tools-extra.
Herald added a subscriber: mgorny.
Add a new check for https://abseil.io/tips/126, to detect uses of constructing a std::unique_ptr with a call to new, and recommend substituting with absl::make_unique or absl::WrapUnique. Note that some functionality may overlap with existing checks to substitute with std::make_unique, but this check differs in that it is specific to Abseil, and in how it utilizes both absl::make_unique and absl::WrapUnique.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D55044
Files:
clang-tidy/abseil/AbseilTidyModule.cpp
clang-tidy/abseil/CMakeLists.txt
clang-tidy/abseil/MakeUniqueCheck.cpp
clang-tidy/abseil/MakeUniqueCheck.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/abseil-make-unique.rst
docs/clang-tidy/checks/list.rst
test/clang-tidy/abseil-make-unique.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55044.175799.patch
Type: text/x-patch
Size: 16451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181129/a47108bf/attachment.bin>
More information about the cfe-commits
mailing list