summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-03-21 21:34:58 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-03-21 21:34:58 +0000
commita079cdbeb80500c85ba8eb9d539528e4c19f9da1 (patch)
tree2ed48a376caf29da50a68a34957d523b6ec8b493
parent4e5a65fc83f8e21d501af28644fcf35f982ee33f (diff)
downloadbcm5719-llvm-a079cdbeb80500c85ba8eb9d539528e4c19f9da1.tar.gz
bcm5719-llvm-a079cdbeb80500c85ba8eb9d539528e4c19f9da1.zip
Apply clang-tidy's performance-unnecessary-value-param to clang-tidy.
No functionality change intended. llvm-svn: 298442
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
index bb4c31d80ec..8ab0c92be19 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
@@ -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())
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index 12c19f6d283..d1361a0b1da 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
@@ -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)
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
index 882e757a1b9..7bf32925199 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.h
@@ -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;
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
index c1c2eb70466..328ddf718e2 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
@@ -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())
OpenPOWER on IntegriCloud