[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'
Zinovy Nis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 9 05:18:31 PDT 2018
zinovy.nis added inline comments.
================
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290
+ : ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)),
+ MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {}
----------------
lebedev.ri wrote:
> alexfh wrote:
> > Maybe make the default 5? Or does anyone really want to replace `int/long/char/bool/...` with `auto`?
> That might be a bit surprising behavioral change..
> At least it should be spelled out in the release notes.
> (my 5 cent: defaulting to 0 would be best)
Maybe we can somehow mention the current option value in a warning message?
https://reviews.llvm.org/D45405
More information about the cfe-commits
mailing list