[PATCH] D20917: [clang-tidy] modernize-use-auto: don't remove stars by default
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 13:06:46 PDT 2016
alexfh added inline comments.
================
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:338
@@ -329,8 +337,3 @@
- // Remove explicitly written '*' from declarations where there's more than
- // one declaration in the declaration list.
- if (Dec == *D->decl_begin())
- continue;
-
// All subsequent declarations should match the same non-decorated type.
if (FirstDeclType != V->getType().getCanonicalType())
----------------
Prazek wrote:
> Can you change this comment to make it more clear, or tell me what it do? I don't quite understand it right now
Will this be better?
// All subsequent variables in this declaration should have the same canonical type.
// For example, we don't want to use `auto` in `T *p = new T, **pp = new T*;`.
http://reviews.llvm.org/D20917
More information about the cfe-commits
mailing list