[PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 10 11:33:20 PDT 2016
aaron.ballman 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));
+ }
----------------
Prazek wrote:
> 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.
Correct, protected constructors should be handled like private constructors.
https://reviews.llvm.org/D23343
More information about the cfe-commits
mailing list