summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
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
commit08df2464073f32c997c3ab39b6a3944a75923884 (patch)
tree6a4649da7f21573d8d099ade9fc0f3bf44e9e408 /clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
parentc3cb054e0cb030f447a1cf1fee2249ebc7e7b299 (diff)
downloadbcm5719-llvm-08df2464073f32c997c3ab39b6a3944a75923884.tar.gz
bcm5719-llvm-08df2464073f32c997c3ab39b6a3944a75923884.zip
[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 llvm-svn: 292491
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp b/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
index a28b1d25a04..06acd310170 100644
--- a/clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp
+++ b/clang-tools-extra/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();
OpenPOWER on IntegriCloud