================
@@ -73,6 +73,14 @@ void 
MakeSmartPtrCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
   const auto CanCallCtor = unless(has(ignoringImpCasts(
       cxxConstructExpr(hasDeclaration(decl(unless(isPublic())))))));
 
+  // A private/deleted destructor would require somehow making std::make_unique
+  // or some of its internal befriend the created type, so better be
+  // conservative in that case.
+  const auto CanCallDtor = unless(hasType(hasUnqualifiedDesugaredType(
+      pointerType(pointee(hasUnqualifiedDesugaredType(
+          recordType(hasDeclaration(has(cxxDestructorDecl(
----------------
serge-sans-paille wrote:

Done and done!

https://github.com/llvm/llvm-project/pull/229802
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to