[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 17 02:24:10 PST 2022
njames93 added a comment.
In D117306#3247417 <https://reviews.llvm.org/D117306#3247417>, @LegalizeAdulthood wrote:
> In D117306#3245915 <https://reviews.llvm.org/D117306#3245915>, @njames93 wrote:
>
>> How does this check play with the `modernize-make-shared` check?
>
> Wouldn't it be orthogonal?
>
> This check looks for existing `make_shared` usages, whereas
> modernize-make-shared adds new `make_shared` usages from
> `new shared_ptr` usages. I wouldn't expect `modernize-make-shared`
> to generate mismatched scalar/array `shared_ptr` instances.
This check looks for constructions of shared_ptr types from an array new expression. modernize-make-shared looks for constructions of shared_ptr types using the new expression, However I'm not sure how it handles the array version.
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