[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 07:47:21 PST 2026
================
@@ -0,0 +1,61 @@
+.. title:: clang-tidy - misc-make-smart-ptr
+
+misc-make-smart-ptr
+====================
+
+Finds constructions of custom smart pointer types from raw ``new`` expressions
+and replaces them with a configurable factory function.
+
+Unlike :doc:`modernize-make-shared <../modernize/make-shared>` and
+:doc:`modernize-make-unique <../modernize/make-unique>`, this check has no
+default smart pointer type or factory function. Both ``MakeSmartPtrType`` and
+``MakeSmartPtrFunction`` must be configured for the check to produce
----------------
EugeneZelenko wrote:
```suggestion
default smart pointer type or factory function. Both :option:`MakeSmartPtrType` and
:option:`MakeSmartPtrFunction` must be configured for the check to produce
```
Also 80-characters limit.
https://github.com/llvm/llvm-project/pull/117529
More information about the cfe-commits
mailing list