[PATCH] D20196: [clang-tidy] Inefficient string operation

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 11:30:42 PDT 2016


alexfh added a comment.

A couple of nits.


================
Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.cpp:51
@@ +50,3 @@
+      hasArgument(
+          0, declRefExpr(BasicStringType),
+          declRefExpr(hasDeclaration(decl().bind("lhsStrT"))).bind("lhsStr")),
----------------
As noted earlier, there's no need to repeat `declRefExpr`. This should be:

  declRefExpr(BasicStringType, hasDeclaration(decl().bind("lhsStrT")))

================
Comment at: clang-tidy/performance/InefficientStringConcatenationCheck.h:25
@@ +24,3 @@
+class InefficientStringConcatenationCheck : public ClangTidyCheck {
+ public:
+  InefficientStringConcatenationCheck(StringRef Name, ClangTidyContext *Context);
----------------
Please format the file with `clang-format -style=llvm`.


https://reviews.llvm.org/D20196





More information about the cfe-commits mailing list