[PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 17 09:35:00 PDT 2016
alexfh added inline comments.
================
Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33
@@ -31,1 +31,4 @@
+ // Calling make_smart_ptr from within a member function of a type with a
+ // private or protected constructor would be ill-formed.
+ auto CanCallCtor = unless(has(ignoringImpCasts(cxxConstructExpr(
----------------
malcolm.parsons wrote:
> The private constructor could also be called from a friend class.
It might only be relevant, if `std::make_(shared|unique)` is declared as a friend of the class in question, which is unlikely to be a common case and I don't think we need to focus on this now.
https://reviews.llvm.org/D23343
More information about the cfe-commits
mailing list