[PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 10:02:25 PDT 2016


Prazek added inline comments.

================
Comment at: test/clang-tidy/modernize-make-shared.cpp:109
@@ +108,3 @@
+  void create() {
+    auto ptr = std::shared_ptr<Private>(new Private(42));
+  }
----------------
aaron.ballman wrote:
> Add comments explaining why make_shared is not correct. Also, please add a case showing that protected constructors still get the proper fix applied.
You mean I should also not warn when the constructor is protected? Make sense.


https://reviews.llvm.org/D23343





More information about the cfe-commits mailing list