[PATCH] D17491: Add performance check to flag function parameters of expensive to copy types that can be safely converted to const references.
Felix Berger via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 26 14:55:10 PDT 2016
flx added inline comments.
================
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();
----------------
alexfh wrote:
> nit: IIUC, there's no need for explicit llvm::Twine around the second `'\''` in this line.
Twine only has an implicit constructor for const char* but not for char. I can either leave it as is or switch to "'".
http://reviews.llvm.org/D17491
More information about the cfe-commits
mailing list