Apply clang-tidy's performance-unnecessary-value-param to clang-tidy.

No functionality change intended.

llvm-svn: 298442
This commit is contained in:
Benjamin Kramer 2017-03-21 21:34:58 +00:00
parent 4e5a65fc83
commit a079cdbeb8
4 changed files with 6 additions and 6 deletions

View File

@ -91,7 +91,7 @@ struct DenseMapInfo<
return Val.first.getRawEncoding() + SecondHash(Val.second);
}
static bool isEqual(ClassDefId LHS, ClassDefId RHS) {
static bool isEqual(const ClassDefId &LHS, const ClassDefId &RHS) {
if (RHS == getEmptyKey())
return LHS == getEmptyKey();
if (RHS == getTombstoneKey())

View File

@ -352,9 +352,9 @@ void UseAutoCheck::replaceIterators(const DeclStmt *D, ASTContext *Context) {
<< FixItHint::CreateReplacement(Range, "auto");
}
void UseAutoCheck::replaceExpr(const DeclStmt *D, ASTContext *Context,
std::function<QualType(const Expr *)> GetType,
StringRef Message) {
void UseAutoCheck::replaceExpr(
const DeclStmt *D, ASTContext *Context,
llvm::function_ref<QualType(const Expr *)> GetType, StringRef Message) {
const auto *FirstDecl = dyn_cast<VarDecl>(*D->decl_begin());
// Ensure that there is at least one VarDecl within the DeclStmt.
if (!FirstDecl)

View File

@ -26,7 +26,7 @@ public:
private:
void replaceIterators(const DeclStmt *D, ASTContext *Context);
void replaceExpr(const DeclStmt *D, ASTContext *Context,
std::function<QualType(const Expr *)> GetType,
llvm::function_ref<QualType(const Expr *)> GetType,
StringRef Message);
const bool RemoveStars;

View File

@ -49,7 +49,7 @@ struct DenseMapInfo<
return Val.first.getRawEncoding() + SecondHash(Val.second);
}
static bool isEqual(NamingCheckId LHS, NamingCheckId RHS) {
static bool isEqual(const NamingCheckId &LHS, const NamingCheckId &RHS) {
if (RHS == getEmptyKey())
return LHS == getEmptyKey();
if (RHS == getTombstoneKey())