malcolm.parsons added a comment.

In https://reviews.llvm.org/D25316#565378, @Prazek wrote:

> Awesome to see this patch. After this one will make it to upstream, it will 
> be much easier for me to do same with template functions.


I was trying to match such functions:

  varDecl(hasType(type().bind("type")),
          hasInitializer(callExpr(callee(
              functionDecl(isInstantiated(),
                           hasTemplateArgument(
                               0, refersToType(type(equalsBoundNode("type")))))
                  .bind("fn")))))



================
Comment at: test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp:2
+// RUN: %check_clang_tidy %s modernize-use-auto %t -- \
+// RUN:   -config="{CheckOptions: [{key: modernize-use-auto.RemoveStars, 
value: '1'}]}" \
+// RUN:   -- -std=c++11
----------------
Prazek wrote:
> What is the difference between this test, and next test?
> The name indicate that it removes star, but I see a lot of test that doesn't 
> use star
> and that seem to be duplicated with the next one.
I could remove the duplicated tests, but the expected fixes are different so 
I'd like to test with and without star removal.


================
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);
----------------
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.


https://reviews.llvm.org/D25316



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to