[PATCH] D50852: abseil-auto-make-unique

Hugo Gonzalez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 10:30:24 PDT 2018


hugoeg created this revision.
hugoeg added reviewers: alexfh, hokein.
hugoeg added a project: clang-tools-extra.
Herald added a subscriber: mgorny.

warns to use 'auto' to avoid repeating the type name and fixes the issue

Replace:
 std::unique_ptr<Foo> x = make_unique<Foo>(...);
with:

  auto x = make_unique<Foo>(...);


https://reviews.llvm.org/D50852

Files:
  clang-tidy/abseil/AbseilTidyModule.cpp
  clang-tidy/abseil/AutoMakeUniqueCheck.cpp
  clang-tidy/abseil/AutoMakeUniqueCheck.h
  clang-tidy/abseil/CMakeLists.txt
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/abseil-auto-make-unique.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/abseil-auto-make-unique.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50852.161059.patch
Type: text/x-patch
Size: 12218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180816/3b692738/attachment.bin>


More information about the cfe-commits mailing list