[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.
Eugene Zelenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 14 07:16:52 PST 2022
Eugene.Zelenko added a comment.
I think this check belongs to `bugprone` module. How about `std::unique_ptr`?
================
Comment at: clang-tools-extra/clang-tidy/misc/SharedPtrArrayMismatchCheck.cpp:1
+//===--- SharedPtrArrayMismatchCheck.cpp - clang-tidy
+//----------------------===//
----------------
Please make it same length and single line as closing comment.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-shared-ptr-array-mismatch.rst:6
+
+Find construction of ``std::shared_ptr<T>`` where it is initialized with a new-expression ``new T[]``.
+The check offers replacement of ``shared_ptr<T>`` to ``shared_ptr<T[]>`` if it is used at a single variable declaration.
----------------
Please make first statement same as in Release Notes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117306/new/
https://reviews.llvm.org/D117306
More information about the cfe-commits
mailing list