aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/utils
diff options
context:
space:
mode:
authorFelix Berger <flx@google.com>2017-01-19 15:51:10 +0000
committerFelix Berger <flx@google.com>2017-01-19 15:51:10 +0000
commitb83a544e611dbcec607644877c137546f665248a (patch)
tree3f888946440372803703e3daf203b4b621513296 /clang-tidy/utils
parent4c65cdd522fecc69166d6b24b1b37d89c1d44b45 (diff)
[clang-tidy] Do not trigger move fix for non-copy assignment operators in performance-unnecessary-value-param check
Reviewers: alexfh, sbenza, malcolm.parsons Subscribers: JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D28899 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@292491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/utils')
-rw-r--r--clang-tidy/utils/DeclRefExprUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tidy/utils/DeclRefExprUtils.cpp b/clang-tidy/utils/DeclRefExprUtils.cpp
index a28b1d25..06acd310 100644
--- a/clang-tidy/utils/DeclRefExprUtils.cpp
+++ b/clang-tidy/utils/DeclRefExprUtils.cpp
@@ -159,7 +159,8 @@ bool isCopyAssignmentArgument(const DeclRefExpr &DeclRef, const Decl &Decl,
parmVarDecl(hasType(matchers::isReferenceToConst())));
auto Matches = match(
decl(hasDescendant(
- cxxOperatorCallExpr(UsedAsConstRefArg, hasOverloadedOperatorName("="))
+ cxxOperatorCallExpr(UsedAsConstRefArg, hasOverloadedOperatorName("="),
+ callee(cxxMethodDecl(isCopyAssignmentOperator())))
.bind("operatorCallExpr"))),
Decl, Context);
return !Matches.empty();