[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto
Edward O via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 1 10:16:29 PDT 2021
eddy-geek added a subscriber: Eugene.Zelenko.
eddy-geek added a comment.
@Eugene.Zelenko wrote:
> Frankly, I don't think that length-based criteria is reasonable one. Readability of code is much more important than line/file length.
It provides an added configuration flexibility without being more complex than a boolean. Arguably some people have found the similar `modernize-use-auto.MinTypeNameLength` useful (PR here <https://cfe-commits.cs.uiuc.narkive.com/q08e5p7t/patch-d45405-clang-tidy-modernize-use-auto-add-a-threshold-for-minimal-type-name-length-to-be>) -- and I find its default of 5 makes sense as `MyTyp` can be argued as always better than `auto` even for people that like `auto`.
That said, I absolutely don't mind changing this PR to define a boolean option `UseAuto` instead, if requested.
//(otherwise I'll address review comments tomorrow. Thanks for the review!)//
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103188/new/
https://reviews.llvm.org/D103188
More information about the cfe-commits
mailing list