[PATCH] D50852: [clang-tidy] abseil-auto-make-unique
Zinovy Nis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 18 12:14:13 PDT 2018
zinovy.nis added a comment.
In https://reviews.llvm.org/D50852#1202774, @lebedev.ri wrote:
> 1. Please always upload all patches with full context.
> 2. There already is `modernize-use-auto`. Does it handle this case? Then this should be just an alias to that check. Else, i think it would be best to extend that one, and still alias.
First of all, thanks, Hugo, for your check!
My +1 for extending `modernize-use-auto` as currently it doesn't support cases your check supports.
Because replacing
std::unique_ptr< int >y = std::make_unique<int>();
with
auto y = std::make_unique<int>();
is logically the same as replacing
long long int *y = new long long int (42);
with
auto* y = new long long int (42);
So your check should extend the existing one and not create one more check IMHO.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50852
More information about the cfe-commits
mailing list