[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts
Piotr Padlewski via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 9 07:33:26 PDT 2016
Prazek added inline comments.
================
Comment at: test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp:25
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use auto when initializing with a cast to avoid duplicating the type name
+ // CHECK-FIXES: auto ll = static_cast<long long>(l);
+ unsigned long long ull = static_cast<unsigned long long>(l);
----------------
malcolm.parsons wrote:
> Prazek wrote:
> > malcolm.parsons wrote:
> > > Prazek wrote:
> > > > Is it possible to simply fix the double spaces?
> > > The existing modernize-use-auto tests have the same problem.
> > > My codebase is clang-formatted regularly so it doesn't bother me.
> > I agree that it is not huge problem with clang-format and of course it is not required to fix it to push this patch upstream. It would be good to leave a comment somewhere with FIXME: about this, so it would be easier for some other contributor to fix it (or if it simple, just fix it in this patch :))
> There's a FIXME comment in one of the existing modernize-use-auto test files.
Yes, but I am talking about FIXME comment in check code. IF someone reads the code, it is much more clear for them that this thing doesn't work completely, than if the programmer would see the error and would have to look at tests or execute clang-tidy to make sure that he understand code well.
https://reviews.llvm.org/D25316
More information about the cfe-commits
mailing list