[PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 24 08:04:13 PDT 2016


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Looks good! Thank you!


================
Comment at: clang-tidy/performance/UnnecessaryValueParamCheck.cpp:26
@@ +25,3 @@
+  return (Name.empty() ? llvm::Twine('#') + llvm::Twine(Index + 1)
+                       : llvm::Twine('\'') + Name + llvm::Twine('\''))
+      .str();
----------------
nit: IIUC, there's no need for explicit llvm::Twine around the second `'\''` in this line.


http://reviews.llvm.org/D17491





More information about the cfe-commits mailing list