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

Malcolm Parsons via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 07:59:41 PDT 2016


malcolm.parsons added a subscriber: malcolm.parsons.

================
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(
----------------
The private constructor could also be called from a friend class.


https://reviews.llvm.org/D23343





More information about the cfe-commits mailing list