bittnerbarni added inline comments.

================
Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:67
@@ +66,3 @@
+    Finder->addMatcher(
+        exprWithCleanups(anyOf(hasDescendant(AssingOperator),
+                               hasDescendant(PlusOperatorMatcher))),
----------------
alexfh wrote:
> 1. The `anyOf(hasAncestor(A), hasAncestor(B), ...)` construct is still there. 
> Please replace it with `hasAncestor(anyOf(A, B, ...))`.
> 2. Is there really no way to change from hasDescendant / hasAncestor to more 
> strict patterns? I believe, running the check on LLVM doesn't help finding 
> performance issues, since LLVM specifically avoids this pattern by using 
> Twine.
  #  I was trying to write it like you suggested since the beginning, but it 
says it cannot deduce the template parameter that way, what's more interesting 
is that clang-query accepts it. 

  # It seems to me that the assignment operator is (always?) direct child of  
`exprWithCleanups`, but I'm not totally sure of that. As for the + operator it 
could be anywhere among the children.


http://reviews.llvm.org/D20196



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

Reply via email to