Avoid naked new in unique_ptr.reset() by using make_unique
Fixes http://llvm.org/PR27383
Paths
| Differential D25898
[clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset() ClosedPublic Authored by malcolm.parsons on Oct 22 2016, 2:46 PM.
Details
Diff Detail
Event Timelinemalcolm.parsons retitled this revision from to [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset(). malcolm.parsons updated this object. Comment Actions Besides this looks good
This revision is now accepted and ready to land.Oct 31 2016, 8:40 AM Closed by commit rL285589: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset() (authored by malcolm.parsons). · Explain WhyOct 31 2016, 8:57 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 75947 clang-tidy/modernize/MakeSmartPtrCheck.h
clang-tidy/modernize/MakeSmartPtrCheck.cpp
docs/ReleaseNotes.rst
docs/clang-tidy/checks/modernize-make-shared.rst
docs/clang-tidy/checks/modernize-make-unique.rst
test/clang-tidy/modernize-make-shared.cpp
test/clang-tidy/modernize-make-unique.cpp
|
Can elide the braces for the if and else.