[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
Mon Apr 30 10:44:36 PDT 2018


zinovy.nis added a comment.

> I think, it's 13, if you choose to remove stars, and 17 otherwise. The difference is excessive spaces vs. required ones. Implementing proper logic may be involved, but we can simplify it to something like "count all non-space characters and a single space between words, but don't count spaces around punctuation":

Isn't it a business of clang-format to determine the number of spaces between lexemes? IMO the solutuion you've provided for `GetTypeNameLength` is enough. Considering punctuation here is overkill :-)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45927





More information about the cfe-commits mailing list