diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-15 15:46:10 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-15 15:46:10 +0000 |
commit | 51a9cc9ce7bbdce7e71b609c4cd2b7f5f6741b4b (patch) | |
tree | c8300d0e42b7b3dde114d07dbfdca493f4109d2e /clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp | |
parent | 7b4ab98b036abef47fea10ebf0a995eb5b04b82b (diff) | |
download | bcm5719-llvm-51a9cc9ce7bbdce7e71b609c4cd2b7f5f6741b4b.tar.gz bcm5719-llvm-51a9cc9ce7bbdce7e71b609c4cd2b7f5f6741b4b.zip |
Apply performance-unnecessary-value-param to clang-tidy.
With minor manual tweaks. No functionality change intended.
llvm-svn: 272795
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp b/clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp index ed2527e42cf..97d23e0e0cf 100644 --- a/clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp +++ b/clang-tools-extra/clang-tidy/misc/DanglingHandleCheck.cpp @@ -21,14 +21,14 @@ namespace misc { namespace { ast_matchers::internal::BindableMatcher<Stmt> -handleFrom(ast_matchers::internal::Matcher<RecordDecl> IsAHandle, - ast_matchers::internal::Matcher<Expr> Arg) { +handleFrom(const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle, + const ast_matchers::internal::Matcher<Expr> &Arg) { return cxxConstructExpr(hasDeclaration(cxxMethodDecl(ofClass(IsAHandle))), hasArgument(0, Arg)); } ast_matchers::internal::Matcher<Stmt> handleFromTemporaryValue( - ast_matchers::internal::Matcher<RecordDecl> IsAHandle) { + const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle) { // If a ternary operator returns a temporary value, then both branches hold a // temporary value. If one of them is not a temporary then it must be copied // into one to satisfy the type of the operator. @@ -54,8 +54,8 @@ ast_matchers::internal::Matcher<RecordDecl> isAMap() { "::std::unordered_multimap"); } -ast_matchers::internal::BindableMatcher<Stmt> -makeContainerMatcher(ast_matchers::internal::Matcher<RecordDecl> IsAHandle) { +ast_matchers::internal::BindableMatcher<Stmt> makeContainerMatcher( + const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle) { // This matcher could be expanded to detect: // - Constructors: eg. vector<string_view>(3, string("A")); // - emplace*(): This requires a different logic to determine that |