[PATCH] D90392: [clang-tidy] Omit std::make_unique/make_shared for default initialization.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 06:46:37 PDT 2020


ymandel accepted this revision.
ymandel added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp:135
+                               New->getAllocatedType(), *Result.Context);
+  if (!Initializes) {
     return;
----------------
No braces around the body.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-make-shared.cpp:54
 
   // Without parenthesis.
   std::shared_ptr<int> P2 = std::shared_ptr<int>(new int);
----------------
Please extend comment to briefly explain why there's no fix for this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90392/new/

https://reviews.llvm.org/D90392



More information about the cfe-commits mailing list