aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
Generally LGTM with a few small nits. ================ Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:379 + // + // The fix (std::make_unique) requires to see copy/move constructor of + // Pair. If we found any invisible or deleted copy/move constructor, we ---------------- requires to see -> needs to see ================ Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:383 + // certain about the correct fixes. + if (const auto *RD = New->getType()->getPointeeCXXRecordDecl()) { + for (const auto *Ctor : RD->ctors()) { ---------------- Don't use `auto` here. ================ Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:384 + if (const auto *RD = New->getType()->getPointeeCXXRecordDecl()) { + for (const auto *Ctor : RD->ctors()) { + if (Ctor->isCopyOrMoveConstructor() && ---------------- How about: ``` if (llvm::find_if(RD->ctors(), [](const CXXConstructorDecl *CD) { return Ctor->isCopyOrMoveConstructor() && (Ctor->isDeleted() || Ctor->getAccess() == AS_private); })) return false; ``` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54745 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits