[PATCH] D117306: [clang-tidy] Add new check 'shared-ptr-array-mismatch'.
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 19 02:56:05 PST 2022
steakhal added inline comments.
================
Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-shared-ptr-array-mismatch.rst:22
+ std::shared_ptr<Foo> x(new Foo[10]); // -> std::shared_ptr<Foo[]> x(new Foo[10]);
+ // ^ warning: shared pointer to non-array is initialized with array [nugprone-shared-ptr-array-mismatch]
+ std::shared_ptr<Foo> x1(new Foo), x2(new Foo[10]); // no replacement
----------------
typo
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