Author: d0k Date: Tue Mar 21 16:34:58 2017 New Revision: 298442 URL: http://llvm.org/viewvc/llvm-project?rev=298442&view=rev Log: Apply clang-tidy's performance-unnecessary-value-param to clang-tidy.
No functionality change intended. Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.h clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h?rev=298442&r1=298441&r2=298442&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h (original) +++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h Tue Mar 21 16:34:58 2017 @@ -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()) Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp?rev=298442&r1=298441&r2=298442&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp Tue Mar 21 16:34:58 2017 @@ -352,9 +352,9 @@ void UseAutoCheck::replaceIterators(cons << 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) Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.h?rev=298442&r1=298441&r2=298442&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.h (original) +++ clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.h Tue Mar 21 16:34:58 2017 @@ -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; Modified: clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp?rev=298442&r1=298441&r2=298442&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/readability/IdentifierNamingCheck.cpp Tue Mar 21 16:34:58 2017 @@ -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()) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits