summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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