[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

Zinovy Nis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 21 23:47:38 PDT 2018


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

This patch is a fix for https://reviews.llvm.org/D45405 where spaces were also considered as a part of a type name. So length("int *") was 5 instead of 3 with RemoveStars=0 or 4 with RemoveStars=1.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45927

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: D45927.143465.patch
Type: text/x-patch
Size: 10310 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180422/1b5e569c/attachment-0001.bin>


More information about the cfe-commits mailing list