alexfh added a comment. A few more nits.
================ Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:50 @@ +49,3 @@ + hasOverloadedOperatorName("="), + hasArgument(0, allOf(declRefExpr(BasicStringType), + declRefExpr(hasDeclaration(decl().bind("lhsStrT"))) ---------------- The `allOf(declRefExpr(x), declRefExpr(y))` construct can be replaced with `declRefExpr(x, y)`. ================ Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:54 @@ +53,3 @@ + hasArgument(1, stmt(hasDescendant(declRefExpr( + hasDeclaration(decl(equalsBoundNode("lhsStrT"))))))), + hasDescendant(BasicStringPlusOperator)); ---------------- Indentation is confusing - as though `hasDeclaration` is an argument of `stmt`. Is it a result of clang-format? ================ Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:63 @@ +62,3 @@ + cxxOperatorCallExpr( + hasAncestor(stmt(anyOf(cxxForRangeStmt(), whileStmt(), forStmt()))), + anyOf(AssignOperator, PlusOperator)), ---------------- `hasAncestor` is potentially more expensive, so it should go last. https://reviews.llvm.org/D20196 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits