diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 14:15:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-16 14:16:09 +0200 |
commit | 92da39d5f94c7824099c79c8554cd2b16f0d7929 (patch) | |
tree | 2b121884db0c41a5955c1d2e2f7986982f3636ea /compilerplugins/clang/unusedmethods.cxx | |
parent | ac4f846335fb71f4a11bae6f8f1704ca915ba6af (diff) |
update couple of loplugins for move constructors
Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
Diffstat (limited to 'compilerplugins/clang/unusedmethods.cxx')
-rw-r--r-- | compilerplugins/clang/unusedmethods.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx index d3345d8f8b6a..98f19ac4a00f 100644 --- a/compilerplugins/clang/unusedmethods.cxx +++ b/compilerplugins/clang/unusedmethods.cxx @@ -296,7 +296,9 @@ bool UnusedMethods::VisitFunctionDecl( const FunctionDecl* functionDecl ) if (functionDecl->isDeleted() || functionDecl->isDefaulted()) { return true; } - if (isa<CXXConstructorDecl>(functionDecl) && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyConstructor()) { + if (isa<CXXConstructorDecl>(functionDecl) + && dyn_cast<CXXConstructorDecl>(functionDecl)->isCopyOrMoveConstructor()) + { return true; } if (!canonicalFunctionDecl->getLocation().isValid() || ignoreLocation(canonicalFunctionDecl)) { |