[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
Wed May 16 02:26:43 PDT 2018


zinovy.nis marked an inline comment as done.
zinovy.nis added inline comments.


================
Comment at: modernize/UseAutoCheck.cpp:40
+            ? Alpha
+            : (std::isspace(C) || (!RemoveStars && C == '*')) ? Space
+                                                              : Punctuation;
----------------
rsmith wrote:
> `isspace` here is wrong: it's a locale-sensitive check. Clang assumes UTF-8 throughout; you can use `isWhitespace` from clang/Basic/CharInfo.h to test if the character should be treated as whitespace.
Thanks!


https://reviews.llvm.org/D45927





More information about the cfe-commits mailing list