[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
Sat Apr 7 10:24:34 PDT 2018


zinovy.nis created this revision.
zinovy.nis added reviewers: angelgarcia, malcolm.parsons, alexfh.
zinovy.nis added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, xazax.hun.

The threshold option is 'MinTypeNameLength' with default value '0' which means 'replace any lengths'.
With MinTypeNameLength = 5 'int'/'bool' and 'const int'/'const bool' will not be converted to 'auto',
while 'unsigned' and 'long long int' will be.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45405

Files:
  clang-tidy/modernize/UseAutoCheck.cpp
  clang-tidy/modernize/UseAutoCheck.h
  docs/clang-tidy/checks/modernize-use-auto.rst
  test/clang-tidy/modernize-use-auto-min-type-name-length.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45405.141491.patch
Type: text/x-patch
Size: 4095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180407/b1e3f5ea/attachment.bin>


More information about the cfe-commits mailing list