etienneb added inline comments. ================ Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:35 @@ +34,3 @@ + cxxOperatorCallExpr(hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))), + hasOverloadedOperatorName("+")); + ---------------- you should swap the two parameters
``` hasOverloadedOperatorName("+"), hasAnyArgument(...) ``` matching 'hasOverloadedOperatorName' is less expensive ================ Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:41 @@ +40,3 @@ + cxxOperatorCallExpr(hasDescendant(BasicStringPlusOperator), + hasAnyArgument(ignoringImpCasts(declRefExpr(BasicStringType))), + hasOverloadedOperatorName("+")) ---------------- this is not indented correctly. could you run ``` % clang-format -style=file <your-file> -i ``` ================ Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:47 @@ +46,3 @@ + const auto AssingOperator = cxxOperatorCallExpr( + hasOverloadedOperatorName("="),hasDescendant(BasicStringPlusOperator), + allOf(hasArgument( ---------------- space after "," ================ Comment at: clang-tidy/performance/InefficientStringAdditionCheck.cpp:54 @@ +53,3 @@ + 1, stmt(hasDescendant(declRefExpr(hasDeclaration(decl( + equalsBoundNode("lhsStrT")))) /*.bind("rhs-self")*/))))); + ---------------- You forgot a comment here? http://reviews.llvm.org/D20196 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits